Content Model and Routing
How frontmatter, types, and permalinks define site structure.
Notepub does not infer a CMS model. You define it explicitly in rules.
Building blocks
- Frontmatter fields in each markdown note.
rules.fieldscontract (required/optional/defaults).rules.typesmap fromtypetotemplate+permalink.
Route construction
Given:
types:
article:
template: article.html
permalink: /en/docs/{{ slug }}/
A note with type: article and slug: intro resolves to /en/docs/intro (stored canonical path without trailing slash).
Special cases
- If
redirect_toexists in frontmatter, route status becomes301. - If
noindex: true, route is still served but marked as noindex for SEO metadata/sitemap filtering. canonicalcan be overridden per page in frontmatter.
Validation implications
Depending on validation rules, Notepub can fail indexing for:
- duplicate routes
- duplicate slugs
- unknown content type
- missing template/permalink constraints