Intro to importing docs from external projects
v.0.0.10
The problem
You may want to have documentation from multiple projects on a single site. And you still want those projects repos remain the single source(s) of truth.
What may come first to one's mind is to update docs in the projects and copy the changes to the shared documentation site. Not really a DRY solution.
This customized Docusaurus 2 set up helps to solve the problem in a more consistent way. Also employing CI.
How this site setup is different from official?
This project setup is based on official classic template.
The setup allows to import external repos and keep local repo clones in sync with remote source. It requires git-subrepo installed.
Change log:
docs/
: addintro.md
explaining this project setupdocs/
: importdocu2inc/*
from an external repo bygit subrepo clone
sidebars.js
: addintro
document andImported content
sectiondocusaurus.config.js
: change docs entry point (themeConfig.navbar.links[0].to
property)README.md
: change instructions reflecting changed project setuppackage.json
: addupdate
scriptpackage.json
: changebuild
anddeploy
scripts- add
.github/workflows/continuous-publishing.yml
that triggers build and deploy upon push to remotemaster
The remaining docs come as they are from official Docusaurus 2 classic template.
What next?
Two following sections describe approaches to importing docs from external projects