Title - Front Matter

How to just add a title to a page

Last modified 2025-05-12

ITADS

Table of content
  1. No title case
  2. Title case without primary navigation
  3. Title case with primary navigation
  4. Title case with primary navigation and override

Page title is displayed following these ordered priorities:

  1. By default page title the Eleventy page inputPath if nothing is set into the front matter.
  2. If eleventyNavigation.key is set into the front matter, page title gets this value.
  3. If title is set into front matter, it overrides eleventyNavigation.key as title for the page.

No title case

With the following example, input path is used as title.

layout: libdoc_page

View example

Title case without primary navigation

Into the following example, a title is set into the page header but the page is not linked into the primary navigation.

layout: libdoc_page
title: Just added title to front matter

View example

Title case with primary navigation

Into the following case, the title of the page is the value of eleventyNavigation.key

layout: libdoc_page
eleventyNavigation:
    key: A title with an item into the primary navigation

Title case with primary navigation and override

Into the following case, the title of the page is the value of title overriding eleventyNavigation.key. Into the primary navigation, link text remains Title key.

layout: libdoc_page
eleventyNavigation:
    key: Title key
title: A title with an item into the primary navigation