metalsmith / layouts

A metalsmith plugin for layouts
MIT License
116 stars 49 forks source link

Allow omitting extension for layouts #95

Closed jmatsushita closed 7 years ago

jmatsushita commented 8 years ago

Using an ext option allows to omit extensions on the layout names.

doodzik commented 8 years ago

Why do you want to do this? I think that it will add ambiguity if we allow omitting the file extension.

jmatsushita commented 8 years ago

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.

doodzik commented 8 years ago

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

ismay commented 8 years ago

I agree with the proposal, but the implementation is missing some elements:

If you could implement that we could look at merging this. Thanks!

doodzik commented 8 years ago

@jmatsushita are you going to make the necessary changes? Otherwise I will implement them in the near future.

doodzik commented 7 years ago

We have a rewrite so this is going to be implemented at a later stage