-
I love the idea of the new projects plugin, thanks for developing this! Currently, the plugin behaves more like mkdocs-multirepo and less like mkdocs-monorepo. Specifically, there's no merged seach index and no merged navigation. However, you mention that you're planning to "add support for merging files". So are you envisioning this plugin to be more like monorepo in the future? Or a mix of both? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 45 replies
-
We are aware that there are several multi- and mono-repo plugins, but we're trying to solve different use cases and, as always, make it dead simple 😊 The idea of the projects plugin was born out of our own need to setup the examples repository, which we will start to fill with self-contained and downloadable examples for each and every feature that Material for MkDocs supports to show how features can be configured, and also reduce the communication overhead for us. It's part of our documentation restructuring effort. Our requirements are:
Ideas we plan to explore: ModesLanguagesWe want to support different modes for the projects plugin. As already mentioned, multi-language support is one of the prime candidates for the plugin (and the most upvoted and commented discussion on our GitHub repository!), and it's something that users are struggling with. The plugin should make this simpler and guide the user through setting up a multi-language installation. When you write multi-lingual documentation, you likely don't have each page translated, but that's you goal, i.e., mirror your documentation in different languages. The plugin might help you with that by automatically copying or redirecting to fallback versions of untranslated pages, and add a custom designed banner that is provided by the author. Somehow similar how FastAPI is doing it. It's essentially also similar to the mode of operation of the VersioningWhile git-based versioning is much superior to folder-based versioning in terms of storage, piggy-backing on git's beautiful tree model, some users just can't use the approach that Read about scalability concerns in Docusaurus related to folder-based versioning. DependenciesThe projects plugin allows to build a tree of projects, but currently all projects are assumed to be independent and built in parallel. If we discover use cases where we need projects deeper in the tree to be built before other projects because of dependencies, or because of additional information the plugin might expose (e.g. a list of links, consolidated navigation, you name it), we can add a mode where projects can be built in the correct order. The current enumeration of projects is already a post-order tree traversal, so adding support for "first build A and B, when that's finished, build C" is definitely in scope. Merging of filesWe also thought about that users might want to merge files, e.g. the search index or sitemap. Developing the plugin, we made sure that this can be added when necessary, and I think it will be necessary. Linking between projectsIt will be possible to link between projects by prefix and Markdown file. The plugin will resolve to the actual file location and create an ConfigurationThe projects plugin will make use of the Additionally, solving #4835 will make it even more powerful 😊 If you or somebody else has other ideas to share, feel free to drop them here 😊 When we finished restructuring our documentation, we will construct and provide canonical examples for the use cases we identified so far as part of our documentation. |
Beta Was this translation helpful? Give feedback.
-
Here's another use case – our use case: Say your company is selling products A, B, and C. For each product, there's product documentation. Each product documentation should be deployed individually, e.g., to be bundled with the product. But also, there should be a general platform where all products A, B, and C should be documented. The UX should be seamless, so users don't notice that the platform consists of several sub-projects. There should be one unified search, and one unified navigation. This is a use case that mkdocs-monorepo serves quite well, but the project isn't that active anymore. So I was hoping your plugin could fill that hole. |
Beta Was this translation helpful? Give feedback.
-
We wanted to share that we made progress and decided to offer both options: Link projects in the navigation
You can now do the following in nav:
- Home: index.md
- Product A: project://product-a # -> projects/product-a/docs/index.md
- project://product-b # -> projects/product-b/docs/index.md, using the project's site name
- And this:
- Can also be:
- Nested:
- project://product-c # -> projects/product-c/docs/index.md, using the project's site name Note that this already works over arbitrary levels, so you should be able to nest projects inside projects inside projects. However, you can currently only link projects on the next level. We'll remove this limitation as well. Another cool thing is that the plugin will use the project's site name when you don't provide a link title. We decided to go for the URL syntax with the [Product A Reference](project://product-a/reference/index.md#overview) We'll provide runnable examples in the coming days/weeks that can be checked out. Generate consolidated navigationWe're still working on that, but we're very convinced that it's possible to achieve, as we're already close. You'll be able to use the exact sample example as above, and turn on a configuration flag that will not link but consolidate project navigation among all projects. |
Beta Was this translation helpful? Give feedback.
-
We have another scenario that could fit within the scope of the projects plugin, especially regarding the "versioning" part: Our documentation is created separately for each software release using mike. Our goal is to integrate the same version of the blog seamlessly into all versions of the docs. New blog posts e.g. about releases only in the DEV version's docs aren't very helpful 😛 It would be great if this was possible without rebuilding all old releases everytime a blog change is made. Perhaps some sort of linking between a global blog folder and subfolders for each version would be possible. |
Beta Was this translation helpful? Give feedback.
-
@squidfunk Any plans for when you will continue working on this? I'd love to see the consolidated navigation, even as an early alpha. Another suggestion: When linking projects via |
Beta Was this translation helpful? Give feedback.
-
This is looking quite promising! I wanted to get your thoughts on an additional use case of mine. I have a project that's setup as a monorepo, with multiple components (sub-projects) nested within it. These sub-projects are leveraging the The main idea is wanting to have another site at the root of the monorepo that serves links to each component's API documentation, defaulting the the latest version, while also serving additional static documentation from its own root For my use case, the ideal UX would be if I could make the root project's navigation tabs sticky such that it is displayed when viewing a specific components documentation. But I'm definitely option to other options/suggestions! |
Beta Was this translation helpful? Give feedback.
We are aware that there are several multi- and mono-repo plugins, but we're trying to solve different use cases and, as always, make it dead simple 😊 The idea of the projects plugin was born out of our own need to setup the examples repository, which we will start to fill with self-contained and downloadable examples for each and every feature that Material for MkDocs supports to show how features can be configured, and also reduce the communication overhead for us. It's part of our documentation restructuring effort.
Our requirements are: