Tags¶
Zensical adds first-class support for categorizing pages with tags, which allows users to discover related pages via the search. If your documentation is large, tags can help to discover relevant information faster.
Configuration¶
The built-in tags functionality lets you categorize any page with tags as part of the metadata of the page. Tags are supported by default, no configuration needed.
Tag listings are currently not supported
As we are working towards feature parity with Material for MkDocs, we will be adding features such as tag indexes that are implemented as part of the tags plugin in Material for MkDocs.
Tag icons and identifiers¶
Each tag can be associated with an icon, which is rendered inside the tag. Before assigning icons to tags, associate each tag with a unique identifier, by adding the following to your configuration:
The identifier can only include alphanumeric characters, as well as dashes
and underscores. For example, if you have a tag Compatibility, you can
set compat as an identifier:
Identifiers can be reused between tags to assign groups of tags the same icon. Tags that are not explicitly associated with an identifier will use the default tag icon.
Next, each identifier can be associated with an icon, even a custom icon, by
adding the following lines to you configuration under the theme.icon configuration
setting:
Expand to see an example
Usage¶
Add tags¶
Tags can be added for a document with the front matter tags property. They can
also be used in search without any further configuration. Add the following
lines at the top of a Markdown file:
The page will now render with those tags at the bottom of the page and your users will be able to filter by these tags in the search.
Hide tags on a page¶
While the tags are rendered at the bottom of each page, sometimes, it might be
desirable to hide them for a specific page, which can be achieved with the
front matter hide property: