Replies: 2 comments
-
|
You can solve the output filename issue by using permalinks. This would necessitate defining the permalink in each template file rather than relying on the input filename. Automating this is potentially possible but it would be fairly complex. You can define how Eleventy processes your templates with template overrides. These can be set in a templates front matter or globally in your config file. As I understand it, Eleventy use the filename extension to decide on how the file is processed. Everything is by default output to HTML unless you tell it to be processed differently. |
Beta Was this translation helpful? Give feedback.
-
|
Idea: Register it as a custom language Related to #1037 (pointing to URL transforms). Might be a duplicate of #4056 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When working with templating engines, I'm used to using two file extensions, one to indicate the type of file that results after being processed by the templating engine, and one that indicates which templating engine I'm using. As an example, for an HTML file preprocessed by Nunjucks, I would use
.html.njk, and similarly, Markdown would be.md.njkWhen I do this with Eleventy though, then with a file named
myfile.html.njkI would end up with an output file path likemyfile.html/index.htmlbecause the text after the first dot is being considered part of the actual name of the file, which is obviously not ideal..md.njkalso gets interpreted as HTML+Nunjucks instead of Markdown+Nunjucks. Is there some way I can get Eleventy to consider all of.html.njk/.md.njkas part of the file extension, and not just the.njkon the end?Sorry if this seems like an obvious fix to people who have used JavaScript or Eleventy a lot before, I use JavaScript only sparingly and this is my first time using Eleventy, so I admittedly only just barely know what I'm doing :v
Beta Was this translation helpful? Give feedback.
All reactions