-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default template parser #20
Comments
I like this. Nice way for everyone to get what they want without making things awkward. By the same token, I think we might want to have some sort of template registry that is exposed and can be modified in the config. And then we can have a mapping of extension to engine. So that way, you can decide to just use, say, |
I have a hacked version of this working in the We need to know the file encoding before reading the files into the page objects and before writing the files out in the build and deploy process. Otherwise things like the |
related: #42 |
Currently haiku treats anything in
site.content
as if it were text and needs to be parsed by mustache.To support the Rocket.ly use case of having everything in content directory (i.e. not needing to have a separate public directory) I think we can add a configuration option like:
Which would turn off the behavior of assuming mustache is okay to run on any files in the content directory and only use a parser if it is called for in the file's name. So with
defaultTemplateEngine
set tofalse
a directory like this:Would only have the about.md.mustache file run through Mustache and Markdown, the other would be left alone.
Also having a
defaultTemplateEngine
will allow one to set their default engine to Handlebars for instance once we add support for it and not require the .handlebars extension added to the end of every fileThe text was updated successfully, but these errors were encountered: