A Gatsby theme
to add tagging support to MDX pages. This theme processes nodes of type
only, which are created by
Mdx nodes are processed, which fulfill the compatibility
requirements described below.
||Basepath for deployments at locations other than root.|
||tags||The tag collection is part of the path of tag pages.|
||Array of collections from which the theme collects tags. The theme looks at the
A theme is compatible with @maiertech/gatsby-theme-tags-core if all of the following requirements are met:
- It uses
gatsby-plugin-mdxas parent theme.
- It adds fields
- It supports a
tagsproperties in the frontmatter of MDX pages it processes, i.e., template queries include
Let’s start with the last requirement. Frontmatter of tagged MDX pages needs to include the following keys:
||✓||Array of tags. Think of tags as keys, not strings, that might be used for pulling localization strings later on. Therefore, tags should not contain spaces.|
The frontmatter can also include optional
is optional, because tagging should also work for content types without a date,
description is optional to allow for alterantive ways of deriving
a description, e.g., from the first paragraph.
The second requirement states that corresponding
Mdx nodes need to contain the
||✓||Collection to which a node belongs.|
||✓||Path to generated page.|