Skip to content

Any plans for adding parameters? #4

@acinis

Description

@acinis

Do you have any plans to add parameters such as passing <title> content as a CLI option or via a dedicated file? If not, then maybe you could at least consider "parameterized inclusion"?

If I remember correctly, I was in a very similar situation 9 years ago and wrote several shell scripts for the exact same task. Later, the project became a simple SSG written in Perl 5 with a customized HTML::Template templating engine.

One of the things I was quite happy with was something I called parameterized inclusion. Consider the following example:

{{include banner.html}}
<div id="main">
    {{p-include content}}
</div>

shit -i in/ -o out/ --p-include content=content-with-wide-image.html

Now you can dynamically control which file is included only by passing the appropriate parameter.

BTW, loops and simple conditionals would be really cool. I've often thought about restarting my old project, but with my own template engine, but I've never found the time to do so. It will be nice to see how a similar project develops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions