vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

Hosting documentation of multiple products under one repo

Open brsanthu opened this issue 5 years ago • 4 comments

We have multiple products for which we need to document. Each documentation site would need some custom fonts, and custom vue components. We have built them and added them to appropriate .vuepress subfolder.

While we have exposed documentation for each product under different path, we have couple of shortcomings in hosting these docs for multiple products.

  • Seach. When user searches for something results shows across all products. We want to limit the results to product (pages under a specific path).

  • Header title. Header title is always main one what we configured in the vue config file. Is it possible to override this depending on the path of the url?

brsanthu avatar May 14 '20 22:05 brsanthu

We achieved this as follows.

  1. Have single .vuepress folder with all components and base config
  2. Folder for each product with config that needs to be overridden for each product (typically nav and sidebar)
  3. Have couple of scripts when built, will copy the .vuepress into each product folder, overrides the config files and does vuepress build in that folder.
  4. Copy over the generated dist folder into main dist folder
  5. Repeat for each product.

While this may not be usual requirement but having some support to share single .vuepress folder across multiple independent product docs folder would be nice.

brsanthu avatar May 21 '20 00:05 brsanthu

CC @ryannmedina this could be interesting for us as we turn attention towards splitting our implementation out for the individual products.

itsxallwater avatar Jun 04 '20 19:06 itsxallwater

@brsanthu Thank you for sharing your experience, I am trying to do the same, hosting multiple documentations under one repo. I followed your steps.

However, I am not able to override the sidebar and navbar for the different documentations. The navbar and sidebar do not change when I switch from one documentation to the next. Even though the html files that were built contain a description to the right sidebars and navbars.

Any tips on how to achieve that ?

salmaelhdh avatar Nov 22 '22 09:11 salmaelhdh

Actually my need was fulfilled with the multiple sidebar option that is native to Vuepress, it was enough to distinguish the 2 documentations

salmaelhdh avatar Nov 24 '22 15:11 salmaelhdh