Vuepress: Hosting documentation of multiple products under one repo

Created on 15 May 2020  路  2Comments  路  Source: vuejs/vuepress

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?

Most helpful comment

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.

All 2 comments

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaomd picture gaomd  路  3Comments

cfjedimaster picture cfjedimaster  路  3Comments

tinchox5 picture tinchox5  路  3Comments

alinnert picture alinnert  路  3Comments

AleksejDix picture AleksejDix  路  3Comments