BTrem

articles tagged “nunjucks”

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.