DocuLinkr: A Python CLI tool to seamlessly link & manage Docusaurus documentation from multiple Git projects into one unified website.
🔗 Project home: https://github.com/FormuLearn/DocuLinkr
📖 Live example: https://docs.formulearn.org
Note: This project is still in very early development. If seeing this before approximately 5th June 2025 it's possible the live example will not yet be live. The system may also still be quite buggy. Any issues and pull requests to this Project's GitHub page are, of course, welcome!
Many organizations maintain documentation in separate Git repositories. DocuLinkr automates the process of merging these scattered docs into a single Docusaurus site, while preserving each project’s individual history and structure.
Key capabilities:
- Scaffold a new Docusaurus site preconfigured for DocuLinkr (
init). - Link a subproject to a main DocuLinkr site via symlinks or copies (
link). - Create boilerplate docs for new subprojects (
startdocs). - Merge docs from either a main site or multiple subprojects (
merge). - Serve the documentation locally with live reloading (
serve).
Install the latest release from PyPI:
pip install doculinkrAlternatively, install from source for development:
git clone https://github.com/FormuLearn/DocuLinkr.git
cd DocuLinkr
pip install -e .DocuLinkr requires:
- Python 3.10 or newer
- Node.js & npm (for Docusaurus scaffolding and serving)
All commands are available via the doculinkr entry point.
Initialize a new Docusaurus site wired up for DocuLinkr:
doculinkr init my-docs-site [--template <template>] [--no-blog]Options:
--template: Docusaurus scaffold template (default:classic).--no-blog: Remove the default blog plugin and folder.
This command will:
- Ensure you’re inside a Git repository.
- Run
npx create-docusaurus <site_name> <template>. - Optionally strip out the blog.
- Render custom configuration (
docusaurus.config.js), sidebars, homepage components, anddoculinkr.yaml. - Seed an example project in
docs/ExampleProject/.
Link a subproject into an existing DocuLinkr main site for local preview:
doculinkr link --site https://github.com/org/main-docs.git [--copy]Steps:
- Verifies you’re in a Git repo root (not a main site).
- Ensures
docs/exists (prompts to create if missing). - Clones or pulls the upstream main site into
.doculinkr/main/. - Renders and injects a
symlink-docsplugin to map yourdocs/into the main site. - Symlinks (or copies, with
--copy) your localdocs/into the clone’sdocs/. - Adds
.doculinkr/to your.gitignore.
Scaffold a new subfolder under docs/ for a project’s documentation:
doculinkr startdocs --proj-name MyProjectResult:
- Creates
docs/MyProject/if missing. - Adds
index.mdandgetting_started.mdfrom templates.
Merge mode varies by context:
-
Subproject mode (
--site):- Refreshes the local clone of the main site in
.doculinkr/main/. - Re-injects the symlink-docs plugin (in case config changed).
- Re-links
docs/→.doculinkr/main/docs/.
- Refreshes the local clone of the main site in
-
Main-site mode (no
--site, invoked inside a main site):- Reads
doculinkr.yamlto locate each project’s repo. - Clones each, grabs their
docs/, and copies them into the main site.
- Reads
Launch a local Docusaurus development server:
# Serve a main site
doculinkr serve
# Serve a linked subproject (after `link`)
doculinkr serve --site-name MainSiteFolder [--install]Options:
--install: runnpm installbefore starting.
Under the hood, it runs npm run start in the appropriate folder.
When init or link generates doculinkr.yaml, it looks like:
projects:
- name: ExampleProject
path: docs/ExampleProject
git_path: https://github.com/YourOrg/ExampleProject.git
- name: Another
path: docs/Another
git_path: ../AnotherRepoIn main-site mode, merge reads this to fetch each project’s docs.
This project is licensed under the MIT License. See LICENSE for details.
Built with ❤️ by Nicholas Roy, CTO at FormuLearn B.V.