Folder meta
Configure a sidebar group — its title, icon, order, and page order — with a meta.ts file.
Every folder in your content tree becomes a sidebar group. Drop a meta.ts beside its pages to control how that group looks and how its children are ordered. It’s entirely optional: without one, the group’s label is the humanized folder name and its pages sort by index, numeric prefix, then alphabetically.
Defining meta
Export a defineMeta object for a fully typed config. Place the file at the root of the folder it configures — guides/meta.ts configures the Guides group:
import { defineMeta } from "blume";
export default defineMeta({
title: "Guides",
icon: "book-open",
order: 2,
collapsed: false,
pages: ["configuration", "theming", "deployment"],
});
Every field is optional — set only what you want to override.
Fields
| Field | Type | Description |
|---|---|---|
title |
string |
The group’s label. Defaults to the humanized folder name. |
icon |
string |
Icon shown next to the label. |
order |
number |
Position among sibling groups and pages. Lower numbers sort first. |
collapsed |
boolean |
Under the group display mode, whether the group starts collapsed. |
pages |
string[] |
Explicit order for the group’s children, by slug. |
The pages array lists children by slug — the folder or file name with its numeric prefix and any parentheses stripped (so 01-quickstart.mdx is "quickstart"). Children you leave out still appear, after the listed ones.
How groups render — flat headers, collapsible disclosures, or drill-in panels — is a sidebar-wide setting, not per folder: see display modes.
Computed meta
Because meta.ts is a real module, you can compute the meta — pass a function (sync or async) instead of an object to build it at scan time. Handy for ordering pages from an external source:
import { defineMeta } from "blume";
export default defineMeta(async () => ({
title: "Guides",
pages: await orderFromCms(),
}));
Ordering within a group
The pages array sets the order of a group’s children. Anything it omits falls back to each page’s frontmatter sidebar.order, then the file system (an index page first, then numeric prefixes, then alphabetical). For the full sidebar precedence — including an explicit config sidebar — see Navigation › Ordering.
To group pages without adding a URL segment, you don’t need a meta.ts at all: use a parenthesized folder name — see Pages › Group folders.
Internationalization
Under i18n, folder meta resolves per locale: put a meta.ts under fr/guides/ to order the French group independently.
For folder meta that’s identical in every language, add a $ marker so one file serves all locales without duplication:
docs/guides/meta.$.ts (folder meta applied to every locale)
A locale-specific meta.ts still overrides the shared meta.$.ts for that language.