favicon for site or author

Trevor Morris 8 posts

Author: TREVOR MORRIS (8 posts)

I am a movie-loving, bike-riding, full-stack web developer from the UK. Here you can read blog posts about web development, view my best photos find interesting links and moreโ€ฆ

2024

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.

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 new when using files.

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.

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 doesn't give you this boilerplate and means you have to make decisions about where everything lives.

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 the popular JavaScript date/time library Moment.js.

Categories
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 was the bulk of the work, but I also needed the CSS to work.

2023

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 unhelpful [object Object] text.

Categories

2022

Using the Netlify CMS locally

I have recently been building a few websites using Eleventy. This is a static site generator, built using Jamstack methodology.

Categories
Some content below may have been published before the release of Eleventy v3.0.0 (October 1, 2024). Information may have changed in newer versions. Current stable release: 3.12
Some content below may have been published before the release of Eleventy v2.0.0 (Feb 8, 2023). Information may have changed in newer versions. Current stable release: 3.12.
Some content below may have been published before the release of Eleventy v1.0.0 (Jan 8, 2022). Information may have changed in newer versions. Current stable release: 3.12.
All of the content below was published before the release of Eleventy v1.0.0 (Jan 8, 2022). Information may have changed in newer versions. Current stable release: 3.12.