Frontmatter
This is a comprehensive guide for all frontmatter keys that LFP Docs exposes. See the frontmatter guide on usage details.
Global
config
- Type:
LFPDocsConfig
layout
- Type:
string - Default:
lfp-base-layout
Per Page
Frontmatter keys marked as "per page" may also be set on directory data files or added globally but might also make sense when added on a more individual basis.
author
- Type:
string
If author is set, a <link> element with rel="author" will be added for that page and the author will be mentioned in the page's metadata section, if applicable.
badge
- Type:
"caution" | "important" | "note" | "tip" | "warning"
Set a badge that is shown alongside the page's title in the side navigation and at the top of the page itself.
category
- Type:
string
date
- Type:
string - Default:
git Last Modified
lang
- Type:
string - Default:
en
langDir
- Type:
string
layout
- Type:
string - Default:
lfp-base-layout
order
- Type:
number
Defines, where an entry should be located in the sidebar navigation. Pass 1 for the entry to be placed at the top, 2 for second place etc. Pass negative values to sort from the bottom up, with -1 being the last entry.
permalink
- Type:
string | boolean
Overwrites Eleventy's default behavior of file-based-routing by writing the page to the given permalink, as path relative to the output directory. If set to false, does not write file at all. Must not be identical with another output path.
styles
- Type:
string
title
- Type:
string
toc
- Type:
boolean
If true, shows a table of contents for the current page. Overwrite the global configuration setting on a per-page basis. By default, LFP Docs shows a table of contents on every page. If a page has no headings, a table of content is never included.
topic
- Type:
string
Per Category
While all frontmatter for each page can also be placed on each page, individually, Eleventy supports file-based data files, where you can set frontmatter values that are valid for all files inside that directory (though, these values can be overwritten by each page). For LFP Docs, file-based source organization is not mandatory, but highly recommended.
As a consequence, the following keys could also be set on each page, but make a lot more sense when placed in a common data file.
categoryOrder
- Type:
number
Just as order for pages, categoryOrder defines, where a category should be located in the sidebar navigation. Pass 1 for the category to be placed at the top, 2 for second place etc. Pass negative values to sort from the bottom up, with -1 being the last entry.