As part of my commitment to writing about things I've written in other frameworks in Eleventy, this is how I re-engineered my /now page in Eleventy. A

Building my /now page using Eleventy • Cory Dransfeldt

submited by
Style Pass
2023-03-19 18:30:07

As part of my commitment to writing about things I've written in other frameworks in Eleventy, this is how I re-engineered my /now page in Eleventy.

As part of my commitment to writing about things I've written in other frameworks in Eleventy, this is how I re-engineered my /now page in Eleventy.[1]

My /now page is a series of discreet sections — the Currently block is populated by data from omg.lol's status.lol service and several static bullet points and complimentary SVGs. The data request to retrieve my status looks like the following:

The Listening: albums call is quite similar, swapping the user.gettopartists method for user.gettopalbums. The liquid templating for artists iterates through the retrieved and cached data to populate the section:

Artist images are populated by passing the artist object to an artist filter which strips spaces, replacing them with - and normalizing the artist name string to lowercase:

Leave a Comment