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

Template extension aliasing, use .markdown for markdown files #207

Closed
zachleat opened this issue Sep 5, 2018 · 13 comments
Closed

Template extension aliasing, use .markdown for markdown files #207

zachleat opened this issue Sep 5, 2018 · 13 comments

Comments

@zachleat
Copy link
Member

zachleat commented Sep 5, 2018

Some mechanism to allow extension of existing template engines with additional file extensions.

@paulrobertlloyd surfaced this in #117 (comment) with the desire to use .markdown.

I wonder if it would be useful to remove the original .md if you’re using something else or if supplementing is sufficient.

@zachleat zachleat added enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. labels Sep 5, 2018
@zachleat
Copy link
Member Author

zachleat commented Sep 5, 2018

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

The enhancement backlog can be found here: https://github.com/11ty/eleventy/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment with 👍!

@zachleat zachleat closed this as completed Sep 5, 2018
@zachleat
Copy link
Member Author

Also a request in #223 to use .mst as a mustache alias via @coolshaurya

@coolshaurya
Copy link

The default file extension used for template engines should be the most commonly used extension - .md for markdown , .hbs for handlebars , .mst for mustache ,.html for HTML etc. which mostly happens to be the shortest extension among the 2 file extensions that some template engines have.

@zachleat
Copy link
Member Author

Just a cursory look at the mustache.js docs would suggest .mustache is more commonly used than .mst but we’ll probably support both moving forward (after this feature is included)

https://github.com/janl/mustache.js

@zachleat
Copy link
Member Author

cc @medfreeman can you upvote here instead of #124? Thanks!

@zachleat zachleat added this to the Next Patch Version milestone Nov 30, 2018
zachleat added a commit that referenced this issue Nov 30, 2018
…only includes supplementing (if you add .markdown it requires you also to parse .md files).
@zachleat
Copy link
Member Author

Please see the limitation of the current implementation at #207 and let me know what you think. Wondering how deep to go here.

@zachleat
Copy link
Member Author

As it stands, this is slated for 0.7.0.

@zachleat
Copy link
Member Author

Sorry but this is being punted out of 0.7.0 for now. I’m not happy with my implementation and I think it will cause headaches so I will revisit for a future release!

@zachleat zachleat removed this from the 0.7.0 milestone Jan 10, 2019
@zachleat
Copy link
Member Author

zachleat commented Jan 10, 2019

Keep in mind the relevant (closed) discussion at #319. We’ll coalesce here at this issue.

@zachleat
Copy link
Member Author

zachleat commented Dec 28, 2019

Related .cjs and .js: #826 #827

@montanaflynn
Copy link

I would love to add aliases for existing formats. We have a custom markdown file format called mathpix markdown which is supported through markdown-it plugin but the extension is .mmd. We want to support both .md and .mmd with eleventy.

I think there was some progress on this at #319, I really don't think anyone wants to not use the default and only pick up the added aliases.

@tobyspark
Copy link

tobyspark commented Jun 28, 2021

Aliasing would be great. Don’t need replacement.

I’m pro .markdown (as is its creator).

@zachleat zachleat removed the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Dec 14, 2022
@zachleat zachleat added this to the Eleventy 2.0.0 milestone Dec 14, 2022
@zachleat
Copy link
Member Author

This is shipping with 2.0.0-canary.19 https://www.11ty.dev/docs/languages/custom/#aliasing-an-existing-template-language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants