A Python CLI to seamlessly link & manage Docusaurus documentation from multiple Git projects into one unified website.
Project description
DocuLinkr
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!
Overview
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).
Installation
Install the latest release from PyPI:
pip install doculinkr
Alternatively, 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)
Commands
All commands are available via the doculinkr entry point.
doculinkr init <site_name>
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/.
doculinkr link --site <url_or_path>
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.
doculinkr startdocs -n <ProjectName>
Scaffold a new subfolder under docs/ for a project’s documentation:
doculinkr startdocs --proj-name MyProject
Result:
- Creates
docs/MyProject/if missing. - Adds
index.mdandgetting_started.mdfrom templates.
doculinkr merge [--site <url_or_path>]
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
doculinkr serve [--site-name <folder>] [--install]
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.
Configuration (doculinkr.yaml)
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: ../AnotherRepo
In main-site mode, merge reads this to fetch each project’s docs.
License
This project is licensed under the MIT License. See LICENSE for details.
Built with ❤️ by Nicholas Roy, CTO at FormuLearn B.V.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file doculinkr-0.1.0.tar.gz.
File metadata
- Download URL: doculinkr-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33a22a99fd4b594fde97785cb91016e0f9fd492b08853c47c7efb7e90d6d2695
|
|
| MD5 |
5609742449ad99b75e98990b93c6617a
|
|
| BLAKE2b-256 |
0cbafff9ab44f7c46d4699d75a58233b61bca0fd530bee5c4cb3d5ec304b8d24
|
File details
Details for the file doculinkr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: doculinkr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5e98417fcddef1c04ac01d7cff75db658b30b9c195e1f66259d02d0814a0c87
|
|
| MD5 |
c91a2d607ef40e31322c208dca6089e4
|
|
| BLAKE2b-256 |
6b113508d11cce3431d09eb5d46cb2df2c01687f157185df611c557dfa2a0fee
|