backstage / backstage/mkdocs-monorepo-plugin

Enhancement - allow include to point to Git URL for mkdocs.yml & docs in other repos

Open
#11 10 comments 11 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
400
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Oooh wouldn't this be so cool... :)

So you mention the ability to use git submodules to include the mkdocs.yml + docs in other repositories. If these sub-repos (let's call them) are standalone mkdocs directories without any developer code, this works.

However, let's say you have a bunch of dev code in a sub-repo, but you also want to have the documentation live there in a 'docs' folder. And then you have several of these sub-repos with separate docs folders. This sort of distributed system is great because the docs live alongside the code (docs-as-code), and developers can make changes to their code _and_ documentation with a single commit, but still have a central mkdocs build for ALL the documentation.

The problem with git submodules is they inherently bring over the _entire_ repository, not a single directory. In the scenario above using submodules, all the code would be brought over alongside any documentation. This is quite a bit of bloat, and you would have to then solve for excluding all the code from your docs build. Submodules are also a bit messy anyways, particularly for tech writers or folks not familiar.

What would be ideal is to have separate "docs" directories in each sub-repo, and only bring over that specific folder into the primary docs build at the time of the build. I'm currently using a Git overlay tool called Gilt in the mkdocs build to solve for this very problem.

It would be nice to have this functionality included in your tool - allow the mkdocs.yml include function point to a Git URL of a mkdocs.yml + docs in another repo (making sure to point to the right folder and branch). Then everything can be brought together for the primary mkdocs build.

I betcha this would help your own documentation flow too ;)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the plugin's existing include handling and the mkdocs.yml configuration described in the issue. Trace how documentation folders from sub-repositories are brought into the central build, including the requested Git URL, folder, and branch inputs. Done means a central MkDocs build can include only the selected docs directory from another repository without bringing in its developer code.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.