Skip to content
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

Add ability of templates to set the extension of resulting files #4

Open
mercmobily opened this issue Feb 1, 2020 · 0 comments
Open

Comments

@mercmobily
Copy link
Contributor

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.

@mercmobily 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant