8 posts by Trevor Morris
Eleventy Collections from an API
I've been tinkering with a new Eleventy project and decided to fire it up using the 3 beta version. I started by creating two collections using markdown files. Each collection had a template…
Sep 24, 2024
by Trevor Morris (8 posts) · Website & RSS feed
Categories: CollectionsFiltersHow to...Pagination
Dynamic Importing with Eleventy
After organising Eleventy filters, shortcodes etc I had an idea to tidy the code even more and make it dynamic. I wanted to automatically import any new functions that were added, including…
Aug 28, 2024
by Trevor Morris (8 posts) · Website & RSS feed
Categories: CollectionsConfigurationFiltersHow to...Shortcodes
Eleventy Filters in Collections
If you're building up a custom Eleventy collection using addCollection, you may need to use existing filters to create the desired data. For built-in collections using tags, there is the ite…
Aug 26, 2024
by Trevor Morris (8 posts) · Website & RSS feed
Categories: CollectionsFiltersHow to...
Organising Eleventy Filters, Shortcodes and more…
I work a lot with the Laravel framework, which scaffolds much of your initial setup and has conventions for where code should be stored. Starting a brand new Eleventy project from scratch do…
Aug 22, 2024
by Trevor Morris (8 posts) · Website & RSS feed
Categories: ConfigurationFiltersHow to...Shortcodes
Eleventy Date Filter with Ordinals
When working with dates in JavaScript, you probably reach for a library to help you parse, manipulate and display the values. For a recent Eleventy project, I used Luxon – the successor to t…
Aug 20, 2024
Organizing NPM Build Scripts
I recently took an existing codebase and ported it over to Eleventy. The main purpose was to recreate the website with existing markdown files and CSS. Creating the collections and templates…
Jun 27, 2024
by Trevor Morris (8 posts) · Website & RSS feed
Categories: Asset PipelinesCSS/SassHow to...
Eleventy JSON Output
For a small Eleventy-based project I wanted to output an example.json file – stored in the data folder – in a nunjucks template. If you simply output the variable example you'll see the unhe…
Sep 29, 2023
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.
Using the Netlify CMS locally
The markdown file uses the `/src/layout/admin.njk` template. This is very similar to the default Netlify CMS example. ```html <!doctype html> <html> <head> <meta charset…
Jan 18, 2022