Skip to main content

Official 11ty docs

Nunjucks/Macros

Template Language—Nunjucks — Eleventy

23 posts in '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

Categories: Front MatterHow 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

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

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

Categories: ConfigurationHow 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

Categories: FiltersHow to...Nunjucks/Macros

From Nunjucks to Liquid

Changing the template language from nunjucks to Liquid in my eleventy project

Jul 14, 2023

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

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

Categories: Nunjucks/MacrosHow to...

Kevin is a designer based in the UK specialising in digital product design, design systems and all things web.

Jan 7, 2023

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

Categories: Nunjucks/Macros

11ty quick tip: Nunjucks include in markdown without indentation

If you're not careful, included files are not correctly rendered.

Mar 19, 2022

Categories: Nunjucks/MacrosMarkdown

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

I design and build websites, web applications, and data visualizations. I’ve been known to play fiddle from time to time and board games.

Nov 20, 2021

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

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

Categories: Nunjucks/Macros

Using Nunjucks shortcodes in Markdown files in Eleventy

Unlock the power of Eleventy Image in your md posts

Jul 29, 2021

Categories: MarkdownNunjucks/MacrosShortcodes

Encapsulated Eleventy/Nunjucks components with macros

How to pass parameters to an include in Nunjucks

Feb 19, 2021

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

Categories: Nunjucks/Macros

Twitter Cards with Nunjucks and 11ty

Using cards makes sharing your content on Twitter look much nicer.

Feb 28, 2020

Categories: Nunjucks/MacrosSocial MediaHow to...

Get the blog by email (or RSS)

Powered by Buttondown