BTrem

articles tagged “11ty”

add syndication microformat with 11ty

add the microformats u-syndication property to your list of articles using 11ty and nunjucks

If you publish an article in more than place — for example on your website and on a community blog ‐ you may want to inform readers and search engines about the other copy. One way to do that is by adding a rel=syndication link element in the article's head. Another is with the u-syndication property from the microformats h-entry vocabulary.

Building off of "add syndication links with 11ty", this article shows how you can add syndication anchor links to pages and article/post lists using 11ty and nunjucks.

add syndication links with 11ty

Suppose you publish an article in more than place — for example on medium and on your own website. If you want to alert readers about the other copy, you can do so with a rel=syndication link element. Here's how you can add syndication links to your pages using 11ty and nunjucks.

11ty nunjucks front matter parsing

11ty lets web authors add a tag to a page in the front matter:

---
tags: cat
---

Or several tags:

---
tags:
- cat
- dog
---

Either way, 11ty will include that page in a collection of articles tagged 'cat'.

I wanted to be able to process my own front matter variables the same way, using either format.

microblog with eleventy

I use 11ty to publish articles like this one, but I also want to be able publish status updates, sort of like my own Twitter feed. Like a Twitter feed, I want each update to include a date and time when I wrote it. Unlike a twitter feed, I don't want each post to have a permanent url. Instead, I want to show the most recent updates on my home page, and I want to bump off the oldest status update every time I add a new one. This article explains how I did it.