Using addExtension for a new template engine! #3549
Unanswered
jido
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just wanted to share that I could get this to work (mostly) so you can take inspiration.
First go in your Eleventy project folder and install the template engine. In my case it is Mistigri, which I developed previously:
Then edit your
.eleventy.js
file:You can now start using it for your templates. For example I used
base.mi
as layout:Now if you do Markdown templates, it is annoying that Liquid is used instead of your own template engine for the frontmatter. Specially in my case since the syntax is quite similar it felt confusing. Let us replace it:
I also added two filters to use in the templates.
Here is a sample
index.md
:With blog posts in the
blog
folder and thisblog/blog.json
:And this is
articles.mi
:You can see a use of
makeslug
for the permalink. The article data is returned by_data/cms.js
.Beta Was this translation helpful? Give feedback.
All reactions