Official 11ty docs
Nunjucks — Eleventy
27 posts in 'Nunjucks/Macros'
Adding Random Content Using Eleventy
Learn how to use Eleventy to add dynamic, random content like film quotes or targeted Q&A sections to your website. A step-by-step guide with practical examples and code snippets.
Dec 13, 2024
by Stu Robson (1 post) · Website & RSS feed
Categories: Data CascadeHow to...Nunjucks/MacrosShortcodes
Eleventy - Zero JS charts
It'd be cool to be able to sprinkle in some charts to your website easily. And without a lick of client-side JavaScript.
Sep 9, 2024
by Rob O'Leary (11 posts) · Website & RSS feed
Categories: CSS/SassHow to...Nunjucks/Macros
Dynamic Content Includes
In this post, I explain how I solved two issues at the same time by introducing a feature to my post layout that I’m calling pre and post includes.
May 24, 2024
by Chris Burnell (7 posts) · Website & RSS feed
Categories: Front MatterHow to...LayoutsNunjucks/Macros
Controlling whitespace in 11ty with Nunjucks
Eleventy (11ty) Tutorial
May 11, 2024
by Al Power (8 posts) · Website & RSS feed
Categories: DebuggingHow to...LayoutsNunjucks/Macros
A custom collection to sort events with Eleventy
I made a custom collection with a filter to sort events by their custom date data.
May 9, 2024
by Sami Määttä (5 posts) · Website
Categories: CollectionsDatesFiltersFront MatterNunjucks/Macros
Refactor by shortcode
I decided to take on some overdue refactoring of the 11tybundle.dev site. Here's what I did.
Feb 20, 2024
by Bob Monsour (13 posts) · Website & RSS feed
Categories: FiltersHow to...Nunjucks/MacrosShortcodes
Different favicon for development build
How to make tabs in the browser always show which build you’re working on.
Jan 30, 2024
by Nikita Dubko (1 post) · Website & RSS feed
Categories: ConfigurationHow to...Nunjucks/Macros
Grouping posts by year with nunjucks in Eleventy
Group by year in a clear and readable manner.
Nov 24, 2023
by Christopher Kirk-Nielsen (9 posts) · Website & RSS feed
Categories: CollectionsDatesFiltersHow to...Nunjucks/Macros
Creating a Category Filter in Eleventy
Now I have a few posts, it would be good to have some way to narrow them down when looking for something specific.
Sep 9, 2023
by Thomas Rigby (6 posts) · Website & RSS feed
Categories: FiltersHow to...Nunjucks/Macros
From Nunjucks to Liquid
Changing the template language from nunjucks to Liquid in my eleventy project
Jul 14, 2023
by Morten Birch (1 post) · Website
Categories: Nunjucks/Macros
Time to move on from Nunjucks?
Here are some points to consider about how you should build and maintain Eleventy sites going forward.
Mar 18, 2023
by Bryce Wray (26 posts) · Website & RSS feed
Categories: Nunjucks/Macros
CAUTION
The posts below were published before the release of Eleventy v2.0.0 (Feb 8, 2023). Information in these posts may be out of date. The current stable release is 2.0.1. Eleventy v3.0 is currently under development and available for testing.
11ty, nunjucks, tag counts
Using nunjucks to get the count of the posts for a tag.
Jan 31, 2023
by Clayton Errington (12 posts) · Website & RSS feed
Categories: Nunjucks/MacrosHow to...
Components with Nunjucks and 11ty
We are going to be go through the first steps to get up and running with 11ty. Building a 11ty site from scratch will help you keep your site lightweight, scalable and easy to manage.
Jan 25, 2023
by Jeremy Faucher (8 posts) · Website & RSS feed
Categories: CSS/SassConfigurationHow to...Nunjucks/Macros
Creating link tags with a data file and Nunjucks, using Eleventy
Kevin is a designer based in the UK specialising in digital product design, design systems and all things web.
Jan 7, 2023
by Kevin Healy (1 post) · Website & RSS feed
Categories: Nunjucks/MacrosHow to...
Shorter shortcuts through Nunjucks macros in Eleventy
While seeking a way to cut a three-line call down to one line, I found some great advice on using a sometimes-overlooked aspect of a popular templating language.
Sep 24, 2022
by Bryce Wray (26 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Using Eleventy transforms to render asynchronous content inside Nunjucks macros
The online journal of Ashur Cabrera.
Aug 9, 2022
by Ashur Cabrera (8 posts) · Website & RSS feed
Categories: Nunjucks/MacrosHow to...
11ty quick tip: Nunjucks include in markdown without indentation
If you're not careful, included files are not correctly rendered.
Mar 19, 2022
by Tim Kleyersburg (2 posts) · Website
Categories: Nunjucks/MacrosMarkdown
Nunjucks Conditional Statement Examples for Eleventy
We are going to be go through the first steps to get up and running with 11ty. Building a 11ty site from scratch will help you keep your site lightweight, scalable and easy to manage.
Jan 25, 2022
by Jeremy Faucher (8 posts) · Website & RSS feed
Categories: How to...Nunjucks/Macros
Using Storybook with Nunjucks components in Eleventy
The online journal of Ashur Cabrera.
Jan 24, 2022
by Ashur Cabrera (8 posts) · Website & RSS feed
Categories: Nunjucks/MacrosHow to...
CAUTION
The posts below were published before the release of Eleventy v1.0.0 (Jan 9, 2022). Information in these posts may be out of date. The current stable release is 2.0.1. Eleventy v3.0 is currently under development and available for testing.
Includes and Macros
Comparing techniques for encapsulating HTML components in Nunjucks or Jinja2.
Nov 20, 2021
by Evan Sheehan (7 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Using parameters in your eleventy includes with nunjucks macros
Includes are great. But for actual reusability of code, parameters are always needed. Luckily, nunjucks makes this possible with macros!
Aug 10, 2021
by Thomas Semmler (3 posts) · Website & RSS feed
Categories: How to...Nunjucks/Macros
Modular code with Nunjucks and Eleventy
These days, web development and design are all about modularization and components. Template languages have a lot to offer and Eleventy itself has a few tricks up its sleeve.
Aug 6, 2021
by Jérôme Coupé (10 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Using Nunjucks shortcodes in Markdown files in Eleventy
Unlock the power of Eleventy Image in your md posts
Jul 29, 2021
by Cassey Lottman (11 posts) · Website & RSS feed
Categories: MarkdownNunjucks/MacrosShortcodes
Encapsulated Eleventy/Nunjucks components with macros
How to pass parameters to an include in Nunjucks
Feb 19, 2021
by Trys Mudford (2 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Flexible components in Eleventy with Nunjucks macros
Dec 4, 2020
by Iain Bean (2 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Back to Nunjucks for my Eleventy site
Why I’ve decided for now to backtrack from JavaScript-only templating in Eleventy.
Mar 22, 2020
by Bryce Wray (26 posts) · Website & RSS feed
Categories: Nunjucks/Macros
Twitter Cards with Nunjucks and 11ty
Using cards makes sharing your content on Twitter look much nicer.
Feb 28, 2020
by Tom Hazledine (3 posts) · Website & RSS feed
Categories: Nunjucks/MacrosSocial MediaHow to...