Closed jmatsushita closed 7 years ago
Why do you want to do this? I think that it will add ambiguity if we allow omitting the file extension.
Good question :)
Because I like terse syntax and therefore to me this:
---
layout: page
---
looks better than
---
layout: page.jade
---
When it's repeated again and again in files.
Oh I thought of something else....
it seems like a good addition to me, because: the file in use isn't concerned with the engine as stated in issue #85. So this information doesn't need to leak in form of an file extension. Furthermore if you change the engine in use you don't have to alter all your files (+maintainability)
If you add a test case and a Readme entry I will merge this pull request
I agree with the proposal, but the implementation is missing some elements:
params
is used for options that don't belong to metalsmith-layouts, they're passed on to consolidate. If you want to add an option, add it here, here and here. Name the variable ext
for example and then use that instead of params.ext
.ext
option, that way you can be sure that people want to use the option and that the option exists.If you could implement that we could look at merging this. Thanks!
@jmatsushita are you going to make the necessary changes? Otherwise I will implement them in the near future.
We have a rewrite so this is going to be implemented at a later stage
Using an
ext
option allows to omit extensions on the layout names.