ixartz / Eleventy-Starter-Boilerplate

🚀 Eleventy Starter is production-ready with SEO-friendly for quickly starting a blog. ⚡ Built with Eleventy, ESLint, Prettier, Webpack 5, PostCSS, Tailwind CSS 2 and Netlify CMS (optional).
https://creativedesignsguru.com
MIT License
265 stars 56 forks source link

.ejs over .nunjucks? #4

Closed jan-dh closed 4 years ago

jan-dh commented 4 years ago

Was wondering if there was a specific reason for choosing .ejs of nunjucks? A lot of the eleventy plugins ( Reading time for example) are only available for nunjucks.

ixartz commented 4 years ago

Hi @jan-dh, thank for your question. The main reason I use ejs is that you have access to javascript code in your template. Here is an example: https://github.com/ixartz/Eleventy-Starter-Boilerplate/blob/master/src/index.ejs#L23 or here, https://github.com/ixartz/Eleventy-Starter-Boilerplate/blob/master/src/index.ejs#L23

You can write you own JavaScript code.