zmerge¶
zmerge merges the documentation of multiple Zensical projects into one site with a single
navigation, one search index and links that are validated across projects. It fills the gap left by the
mkdocs-monorepo-plugin until Zensical ships
an official solution.
Warning
zmerge is not affiliated with the Zensical project.
Installation¶
Add the markdown extensions and plugins your projects use with --with, e.g. --with mkdocstrings-python to render
API docs with mkdocstrings.
Quick start¶
Create an umbrella project, a regular Zensical project that hosts the merged site, and include your projects in its
nav:
[project]
site_name = "My projects"
site_url = "https://example.github.io/"
nav = [
{ Home = "index.md" },
{ lev = "!include ../lev/zensical.toml" },
{ Typer = "!include git+https://github.com/fastapi/typer.git" },
]
[project.theme]
features = ["navigation.indexes"]
[project.markdown_extensions.admonition]
[project.markdown_extensions.toc]
permalink = true
Build the merged site into site/, or preview it:
zmerge writes the merged project to .zmerge.toml and .zmerge/ and regenerates both on every run. Don't edit them:
your changes are lost, and editing a hardlinked file in .zmerge/docs/ changes your original. Keep .zmerge.toml out
of git; .zmerge/ contains its own .gitignore:
Next, see how to include projects and link between them.
Example¶
These docs are built with zmerge. The example merges the docs of
lev and Typer straight from GitHub, with their
API docs and code examples. See the zensical.toml.