Skip to main content

Official 11ty docs

Nunjucks/Macros

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

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

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

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...

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

Categories: CSS/SassConfigurationHow to...Nunjucks/Macros

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

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

Categories: How to...Nunjucks/Macros

Using Storybook with Nunjucks components in Eleventy

The online journal of Ashur Cabrera.

Jan 24, 2022

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

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