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
Partials might not be e.g. *.html but *.html.hbs #46
Comments
That's true. But it doesn't really matter how much extensions you have, it'll just remove the last one (if there are any) for simpler partial names. So your partial name will just be I'll close this since this is intended behaviour, but let me know if you have further questions! |
@ismay Unfortunately templating engines such as e.g. Handlebars don't support |
Perhaps a |
Yeah that's true. A |
@devinus Btw., could you elaborate on why you'd want to use multiple extensions? I don't see a reason for using .html.hbs instead of .hbs. |
See metalsmith/in-place#33. Multiple extensions for templates seems to be a rails practice. There's no need for multiple extensions with this tool, and not removing all parts of the name following a dot would also prevent problems for files with multiple dots in their name. Feel free to reopen if there is a valid need for files with multiple extensions that I've overlooked. |
What is a For example, my code editor doesn't even know what the minor mode is unless you use a subextension. |
The double extension is a rails convention. There's no need for it with metalsmith as metalsmith doesn't rename or process based on the the last extension, and I don't know of any metalsmith plugins that do. The editors that I know treat .hbs as an html file with handlebars syntax and correctly highlight both. |
https://github.com/superwolff/metalsmith-layouts/blob/master/lib/helpers/read-partials.js#L34
This assumes a single extension, but a partial might need to be e.g.
nav.html.hbs
The text was updated successfully, but these errors were encountered: