Pages

Metadata configuration

Like this page, you can define its title (and subtitle) through front-matter configuration.

title: Pages # title
summary: Metadata configuration # subtitle

The navigation follows bare mkdocs. You should just notice that folders will create categories in the sidebar. To sort the sections, you can use the common 00_section_title/ hack. The first numbers sort the folders in the filesystem (so the sections). They are removed by the theme at compile time.

Important

mkdocs-shadcn has not been tested with highly nested documentation (d>2, i.e. root / folder / folder)

In addition, two other attributes may help to configure pages within the sidebar.

order: 2 
sidebar_title: Navigation title

The order attribute may help to change the rank of the page in the sidebar (without setting the nav setting in mkdocs.yml). By default, mkdocs ranks pages through alphabetical order. We keep this behavior if order is not set. Let us take this example:

| a.md ; order not set
| b.md ; order: 42
| c.md ; order: 0
| d.md ; order not set

After a first pass we will have

| a.md ; order: 0
| b.md ; order: 42
| c.md ; order: 0
| d.md ; order: 1

So in the sidebar we will get a.md, c.md, d.md and b.md.

SEO

The following attributes are supported for SEO (<meta> attributes in the <head>).

description: Extra page description
keywords: mkdocs,shadcn
author: asiffer
image: https://raw.githubusercontent.com/asiffer/mkdocs-shadcn/refs/heads/master/.github/assets/logo.svg

Extra

As we may find in shadcn/ui, we can add a NEW tag in the sidebar (Alpha and Beta are also available).

new: true
# beta: true
# alpha: true