Routing Rules

mkpages preserves structure relative to the chosen content root.

Core rules

Examples

If the command is:

mkpages .

then:

If the command is:

mkpages docs/

then:

Relative Markdown links such as CLI Reference are rewritten so they continue to work after route generation.

The rules above determine the default route that mkpages generates. mkpages preserves YAML front matter, so Jekyll can override that route with a permalink value.

---
permalink: /blog/my-post/
---

For example, blog/my-post.md normally uses /blog/my-post/, but a permalink can publish it at a different path.

More front matter information is available in Front Matter.