4

My team and I are looking to implement a documentation system that allows engineers to put markdown files within a specified folder in each of their service root directories. Since we are in a monorepo, we'd like to have a process that goes through and aggregates all of the necessary markdown files and statically generates a final site.

We'd love to use Docusaurus to handle this task; however, we are running into an issue where it seems unable to serve files that are outside of the directory that it is "installed" (where its config is/where it's invoked).

Example directories:

/docs/ <- docusaurus is in this folder
/service/_docs <- these are the markdown files we'd like to pull from

Docusaurus is able to (a) resolve the paths (b) writes the json metadata files. I can tell because I've added logging + I see the .json files that are generated in the .docusaurus folder.

We are using the plugin-content-docs and would love to avoid having to write our own plugin:


    [
      '@docusaurus/plugin-content-docs',
      {
        id: 'foo',
        path: path.resolve(__dirname, '..', 'service', '_docs'),
        routeBasePath: 'service'
      },
    ],
TheNastyOne
  • 965
  • 11
  • 19
  • Have you had any luck regarding this? We also looking to integrate Docusaurus inside a monorepo. – elpddev Oct 09 '21 at 14:17
  • I had some success. You may want to look at this [answer](https://stackoverflow.com/a/68162605/3625171) – elpddev Oct 09 '21 at 15:45

0 Answers0