Skip to main content

Official 11ty docs

Nunjucks/Macros

Template Language—Nunjucks — Eleventy

20 posts in 'Nunjucks/Macros'

Refactor by shortcode

I decided to take on some overdue refactoring of the 11tybundle.dev site. Here's what I did.

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.

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.

Categories: FiltersHow to...Nunjucks/Macros

From Nunjucks to Liquid

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

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.

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.

Categories: Nunjucks/MacrosHow to...

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

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.

Categories: Nunjucks/Macros

11ty quick tip: Nunjucks include in markdown without indentation

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

Categories: Nunjucks/MacrosMarkdown

Using Storybook with Nunjucks components in Eleventy

The online journal of Ashur Cabrera.

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

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

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!

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.

Categories: Nunjucks/Macros

Using Nunjucks shortcodes in Markdown files in Eleventy

Unlock the power of Eleventy Image in your md posts

Categories: MarkdownNunjucks/MacrosShortcodes

Encapsulated Eleventy/Nunjucks components with macros

How to pass parameters to an include in Nunjucks

Categories: Nunjucks/Macros

Back to Nunjucks for my Eleventy site

Why I’ve decided for now to backtrack from JavaScript-only templating in Eleventy.

Categories: Nunjucks/Macros

Twitter Cards with Nunjucks and 11ty

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

Categories: Nunjucks/MacrosSocial MediaHow to...

Get the blog by email (or RSS)

Powered by Buttondown