-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building multi-repo docs #265
Comments
Best to keep it in a fork for now - we're trying to keep the set of features nailed down while we work towards a really nicely polished 1.0. Thanks for the well explained request, tho. |
Agree with @tomchristie. This is quite a specific usecase, it might be interesting to see how a plugin/extension API would make this possible. There is a work in progress patch to add one in #237. At the moment it wont have all the hooks you need and it doesn't currently have a stable API. However, using it would be one option that allows you to extend without doing a full fork. Also, note that it is worth reading the history of that PR before diving in, it isn't likely to merge soon. |
@xiongchiamiov what did you end up doing to solve this (combining documentation content from multiple repositories)? @tomchristie @d0ugal has MkDocs implemented this functionality or anything similar in the past 5 years? |
We have added a Plugin API, which might be used to provide some sort of functionality similar to what is requested here. A list of known plugin can be found in the wiki, although I don't see anything like this. That said, there certainly have been discussions elsewhere in various issues about how to use a plugin to add external files, most recently in #1933, where I give some general pointers. |
For information, we had the same problem at Cozy and built a custom solution.
Every outside doc can maintain a toc.yml listing the pages they want to have inside the main doc It's pretty rough and not packaged as a plugin but the idea is there.
|
Thanks for sharing @ptbrowne. I'm interested in doing something similar as well! |
@xiongchiamiov, not sure if you're still looking for a plugin for this but I just started (this weekend) mkdocs-multirepo-plugin to add this feature. DetailsThe plugin introduces the nav:
- Home: 'index.md'
- MicroService: '!import https://github.com/{user}/{repo name}@{branch}' If you'd prefer plugins:
- multirepo:
cleanup: True # (optional) tells multirepo to cleanup the temporary directory where other repo docs are imported to
folder_name: multirepo_docs # (optional) tells multirepo what the temp directory should be called
repos:
- section: Backstage
import_url: 'https://github.com/backstage/backstage'
- section: Monorepo
import_url: 'https://github.com/backstage/mkdocs-monorepo-plugin'
- section: 'Techdocs-cli'
import_url: 'https://github.com/backstage/techdocs-cli@main' |
Hello @jdoiro3 Isn't the plugin available on pypi server? Also, it is my understanding that the plugin only references the already built documentation in these other repositories. It does not build the documentation in each of these other repositories. Could you kindly confirm? Regards, |
@kirannhegde, the plugin is not yet available on pypi. I was planning on write robust testing for the plugin before doing this but have been busy with work/school. See my comment on another issue here for your other question. |
At reddit, we have a primary open-source codebase with many plugins, most of which are also open-source, but a few of which are private. Currently, our documentation is scattered across the Github wikis for each repo, which makes browsing or searching untenable. Plus, incorporating changes to docs in the same commits as changes to the relevant code helps keep things up-to-date. So, I've been looking into alternative documentation solutions.
One option I'm considering is modifying mkdocs to support includes. So, when specifying the project layout, you might have something like this:
Foo repo
Bar repo
which would end up looking as if we had dropped
Foo
right in:In addition to unifying all the different open-source repos, this would also allow all open-source documentation to be organized into one repo, which could then be included in an over-arching private repo that contains internal documentation as well.
Is this something you would find useful for mkdocs, or (if I move ahead with it) should I just keep it isolated in a fork?
The text was updated successfully, but these errors were encountered: