Blogging

How to use blog feature of Eleventy LibDoc

Last modified 2025-05-23

ITADS

Table of content
  1. Minimal blog post front matter
  2. Typical blog post front matter
  3. Custom Open Graph Image
  4. Custom date
  5. Custom author

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

View example

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

View example

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
date: git Last Modified
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

https://raw.githubusercontent.com/olivier3lanc/photographies/master/assets/assets/paysages/hiver/la_pierra_menta_de_la_roche_parstire_alpha_size_3000x1600.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 date: git Last Modified or your own custom date e.g. date: 2016-01-01.

# Custom date
date: 2016-01-01
# Last modified
date: git Last Modified
# Git Last modified
date: git Last Modified # recommended

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