You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the result file name extension is always.html. However, we already have a case where we have the plain template that outputs to .md. So, the result is formally incorrect.
Ideally, templates should know what kind of files they create. However, the "ideal" solution would imply:
Some kind of config file for templates
Ability to specify the resulting extension
The trouble is that the only possible extensions in practical terms will only ever be .md and .html. Plus, .md is a "strange" case. So, we are potentially building a whole config file that will never ever grow to more than one option, and it's only really there to deal with a special case.
The only other solution is to allow layouts to be named like plain.md where the extension will be the resulting file extension. But, I don't like the idea of having directories with extensions.
Another solution is to force .md to any layout where their name starts with plain. Still, not ideal.
The current solution is to use -x to set the extension.
The text was updated successfully, but these errors were encountered:
mercmobily
changed the title
Add ability of templates to set what extension files will have
Add ability of templates to set the extension of resulting files
Feb 1, 2020
At the moment, the result file name extension is always
.html
. However, we already have a case where we have theplain
template that outputs to.md
. So, the result is formally incorrect.Ideally, templates should know what kind of files they create. However, the "ideal" solution would imply:
The trouble is that the only possible extensions in practical terms will only ever be
.md
and.html
. Plus,.md
is a "strange" case. So, we are potentially building a whole config file that will never ever grow to more than one option, and it's only really there to deal with a special case.The only other solution is to allow layouts to be named like
plain.md
where the extension will be the resulting file extension. But, I don't like the idea of having directories with extensions.Another solution is to force
.md
to any layout where their name starts withplain
. Still, not ideal.The current solution is to use
-x
to set the extension.The text was updated successfully, but these errors were encountered: