TILs, snippets—my digital code garden 🌱. By Zander Martineau
All tags All notes javascript (51) css (36) react (33) html (14) typescript (12) testing (8) devops (5) git (5) node (4) cli (4) graphql (4) cheatsheet (4) storybook (2) typography (2) svelte (2) 11ty (2) networking (1) animation (1) services (1) api (1) a11y (1) deno (1) cypress (1) vscode (1) sveltekit (1) ai (1) sql (1) interview (1) questions (1) untagged (17)
© 2025 • Made by Zander • Colophon • RSS

⓫ Eleventy

Link https://www.11ty.dev/docs/
Note date 22 Jun, 2023
Tags 11ty
👋 FYI, this note is over 6 months old. Some of the content may be out of date.
On this page
  1. Eleventy config
    1. Add a filter

Eleventy config Jump to heading

Add a filter Jump to heading

eleventyConfig.addFilter('readableDate', (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('dd LLL, yyyy')
})

Usage:

{{ page.date | readableDate }}

← Back home