Blogging
How to use blog feature of Eleventy LibDoc
2025-09-05
ITADS
To start blogging, just write at least one page with the post
tag. The item "My Posts" into the primary navigation is displayed when at least one page has the post
tag. View blog configuration related pages.
Minimal blog post front matter
layout: libdoc_page
tags:
- post
Typical blog post front matter
Even if not mandatory, it is recommended to use the LibDoc’s configuration blog slug as URL prefix.
layout: libdoc_page
permalink: "{{ libdocConfig.blogSlug }}/my-simple-post/index.html"
tags:
- post
- blogging
title: My simple post
description: This is a simple blog post test
Custom Open Graph Image
The Open Graph Image is a metadata image URL that is displayed when a link to a LibDoc page is shared into a social network. By default, LibDoc configation ogImageUrl
is used on every page but this parameter can be overridden on each page’s front matter with the same key ogImageUrl
.
Then you can customize each page of your project.
layout: libdoc_page
permalink: "posts/another-post/index.html"
tags:
- post
- blogging
title: My another post
description: This is another blog post test
ogImageUrl: https://images.weserv.nl/?url=https://raw.githubusercontent.com/olivier3lanc/photographies/master/assets/paysages/hiver/la_pierra_menta_de_la_roche_parstire_alpha_size_3000x1600.webp&w=1200&h=630&fit=cover&q=30&output=webp
View example or learn more about OG configuration
Custom date
Eleventy LibDoc uses built-in 11ty content dates. By default, the last modified date is applied. But this setting may display unwanted results such as build date. It is recommended to set gitLastModified: true
or your own custom date e.g. date: 2016-01-01
.
# Custom date
date: 2016-01-01
Custom author
It is possible to override the page’s author display. Just add author
key into the front matter with your own string value as author’s name.
author: John Doe
Atom Feed
The Atom feed is a single XML file URL populated only with blog posts that allows visitors to be kept informed about new publications of the blog part.
Once production URL configuration setting is properly set, an Atom feed is automatically built on the URL <productionURL>/feed.xml
.
As an example, here is the LibDoc’s Atom feed https://eleventy-libdoc.netlify.app/feed.xml