Working with #11ty, #nunjucks, and tag counts in today's 12th post of the #100DaysToOffload
#100DaysToOffload #nunjucks #11ty
went back to #11ty ( #eleventy), found out about layouts, so I took my basic HTML file and turned it into a #Nunjucks file in an _includes folder. Included some data; need to include other parts like the navigation, but kept the footer as JavaScript, which needs some tweaking to adjust to a new part.
Any #11ty experts in my little network?
I've got a bunch of .md files in a notes folder, and I've also made a collection of said notes so I can display an index/list page with each note also getting its own page/permalink.
I want to use the same "layout" for both, but the list page loops through the collection using #nunjucks giving me an "item" variable with frontmatter fields accessible in "item.data".
This is obviously not the case for the individual note pages though...
Next I created a fairly simple #nunjucks template that basically follows the #leafletjs getting started guide, and boom: All recorded trails now have their own dedicated map pages.
Code for data file is available here: https://github.com/yehudab/11r/blob/master/src/globals/maps.js
And the template is here: https://github.com/yehudab/11r/blob/master/src/map.njk
Sample map page (in Hebrew): https://yehudab.com/maps/trail-3/
After a few days working with #11ty to build a small bilingual static website I'm really impressed at the dev experience. I'm yet to bump into any rough edges, which has been a nice surprise 😊
Looking forward to @tomchadwin working on the @openlayers web map aspects next week.
#11ty #eleventy #nunjucks #i18n
After a few days working with #11ty to build a small bilingual static website I'm really impressed at the dev experience. I'm yet to bump into any rough edges, which has been a nice surprise 😊
Looking forward to @tomchadwin working on the @openlayers web map aspects next week.
#11ty #eleventy #nunjucks #i18n
Would need some #nunjucks help.
I have the following input:
"Test <a href="#">Test</a>"
How can I output this as
"Test <a href\"#\">Test</a>"
I've been writing my own templating engine. Jinja-based, so similar to #nunjucks. It's interesting where rabbit holes take you.
🔗 “Understanding Filters, Shortcodes and Data in 11ty”
by @MikeRiethmuller@twitter.com
https://nho.io/l/2020/12/09/understanding-filters-shortcodes-and-data-in-11ty/
Do you write notes in #markdown? Does organizing/searching for your notes fill you with rage? Then perhaps this thing I hacked together might interest you!
https://gitlab.com/DougInAMug/noteasy
(My first published 'code project', critical feedback welcome.)
#markdown #metalsmith #foss #nunjucks #productivity
I'm new to templating. I think I've narrowed my choices to #nunjucks or #handlebars. Opinions please.