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

More extensible template syntax chaining. #3298

Closed
zachleat opened this issue May 27, 2024 · 5 comments
Closed

More extensible template syntax chaining. #3298

zachleat opened this issue May 27, 2024 · 5 comments
Labels
enhancement: favorite Vanity label! The maintainer likes this enhancement request a lot. enhancement typescript Type definitions and Typescript issues

Comments

@zachleat
Copy link
Member

Note that markdown and HTML types have an option to preprocess with another syntax: https://www.11ty.dev/docs/languages/

Note also that Custom syntax has access to default renderer when aliasing: https://www.11ty.dev/docs/languages/custom/#aliasing-an-existing-template-language

I would like this to be more extensible beyond just markdown and HTML types, allowing folks to chain together whatever syntaxes they want.

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

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

View the enhancement backlog here. Don’t forget to upvote the top comment with 👍!

@zachleat zachleat closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
@zachleat zachleat added the enhancement: favorite Vanity label! The maintainer likes this enhancement request a lot. label May 27, 2024
@zachleat
Copy link
Member Author

Related: #3302

@zachleat zachleat added this to the Eleventy 3.0.0 milestone May 30, 2024
@zachleat zachleat removed the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label May 30, 2024
@zachleat
Copy link
Member Author

Moving off of the queue, related work in #3300 got us close here.

@zachleat zachleat reopened this May 30, 2024
@zachleat
Copy link
Member Author

zachleat commented May 30, 2024

Shipping with 3.0.0-alpha.11. This feature lets you alias to existing custom template syntaxes.

This removes the limitations on:

https://www.11ty.dev/docs/languages/custom/#aliasing-an-existing-template-language

“If key is the only property in the options object, we treat the extension as an alias and use the existing upstream template syntax.”

You can now add the other properties to your addExtension (init, compile, etc) and reference the upstream template syntax with defaultRenderer.

@zachleat
Copy link
Member Author

zachleat commented Jun 3, 2024

Docs updates shipped.

@zachleat zachleat added the typescript Type definitions and Typescript issues label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: favorite Vanity label! The maintainer likes this enhancement request a lot. enhancement typescript Type definitions and Typescript issues
Projects
None yet
Development

No branches or pull requests

1 participant