-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Official Eleventy v3.0 Template Language plugins: ✅ Handlebars, ✅Mustache, ✅ EJS, ✅ Haml, 👀 Pug #3124
Comments
Handlebars |
Mustache |
EJS |
Haml |
Can we warn users in the alphas about this change and link them here? |
Fwiw, all of these languages (and Pug) are not currently in the alpha releases. A warning would be good, yeah! |
Does Haml stand in for Pug here? EDIT: |
@Aankhen Alas, Pug is not going to be bundled in Eleventy v3. :( However, there is an Issue (#3081) tracking work to get a working plugin for Pug in v3. If we can pull it off and do a good job, it might be officially supported. Send me a note if you’re interested in collaborating on a Pug plugin for Eleventy v3. I’ve messed around on my own, but the only success I’ve had so far is in overcoming some further-from-success errors only to arrive at slightly-closer-to-success errors. |
I thought there was going to be an official @11ty/pug plugin? |
I'm also here to show support for - and maybe help with the development of (if @Zearin still needs or wants support) - an official pug plugin! Pug is my beloved and I will die on this hill |
@uncenter @Denperidge @Aankhen: Zach gave me the go-ahead to start on an officially supported Eleventy v3 plugin for Pug. Here it is: https://github.com/Zearin/eleventy-plugin-pug P.S. – I code weird. I hate semicolons. You have been warned. |
Thoughts on |
What you’re saying makes sense, but I was just going along with the precedent of most existing plugin names. I dunno. If its name needs to change before the first official release, that’s okay. |
Hi, I'm using the ejs template engine in my project. And now I want to try to switch to version 3, but, as far as I understand, in version 3 this was removed from the core. So, how can I connect this template engine separately? |
Hi @artemkolinko, I think you should find what you need here in the docs for custom languages: If you have any more questions or this is not helpful for you, feel free to respond with further questions. I also don't know if maybe someone already created a plugin for 11ty 3 for ejs support. From what I can tell at a quick glance, you should be able to add something like this to your config: const ejs = require("ejs");
module.exports = function(eleventyConfig) {
eleventyConfig.addExtension("ejs", {
compile: (inputContent) => ejs.compile(inputContent),
});
// more config
} |
Came here trying to figure out why my Handlebars templates wouldn't render in v3.0 alpha, so I'd second the idea of adding a warning! |
Fwiw a warning did ship in alpha.6! |
Work ongoing here: https://github.com/11ty/eleventy-plugin-template-languages
https://github.com/11ty/eleventy-plugin-template-languages/tree/main/ejs |
Handlebars is now available https://github.com/11ty/eleventy-plugin-template-languages/tree/main/handlebars |
Handlebars, Haml, EJS, and Mustache are now published as plugins, sourced from this repo: https://github.com/11ty/eleventy-plugin-template-languages |
Pug work is ongoing here: #3081 |
EJS has 11.8m users, so it doesn't make sense to drop EJS. Will the EJS plugin which is available for alpha 3 be maintained for future? |
As noted above, the plugins are already available for prerelease testing. |
Actually, I am currently trying to make up my mind about using 11ty for my current project. I have three main concerns. The first was EJS, which, as mentioned above, will be supported in the future. The second is Vite, as I need it for bundling, but I read the community survey and your post about potentially cutting Vite. The third main issue I am facing is form submission; I don't know how to use serverless functions with Netlify or any other functions platform. The only solution I've come up with is using Express as a server for form submission. I spent the whole day researching this, using 11ty with Express and deploying it on Digital Ocean in a single droplet. So this is where I am. Form submission is really important for me, and I am considering not using 11ty at this point, perhaps reserving it for a personal project in the future. |
If it helps, I’ve never used the Vite plugin myself. I’ve always run Vite in parallel with Eleventy, which is reasonably straightforward as long as you remember that the output from one is the input to the other.
For what it’s worth, Eleventy doesn’t make using serverless functions easier or harder than any other SSG: if you can use them with another tool, you can also use them with Eleventy, since their interface is fixed and small. I’d encourage you to share the details here but I suspect they’re not directly related to Eleventy or EJS, so a new Discussions thread might be more appropriate. (Do tag me if you create one so I don’t miss it.) |
Past discussion: #3074 and #1103
Please upvote the following comments for each of these languages to vote for their continued survival as an officially supported plugin:
The text was updated successfully, but these errors were encountered: