backstage / mkdocs-monorepo-plugin

✚ Build multiple documentation folders in a single Mkdocs. Designed for large codebases.
https://backstage.github.io/mkdocs-monorepo-plugin/
Apache License 2.0
313 stars 75 forks source link

Error when no `nav` and `docs_dir` are specified #81

Closed dariocurr closed 1 year ago

dariocurr commented 1 year ago

I was trying to build my monorepo documentation having the following in the general mkdocs.yml

site_name: "Example"
site_description: "Description Here"

docs_dir: ./docs

plugins:
  - monorepo

nav:
  - Home: "index.md"
  - Subnav:
    - index.md
    - index.md
  - Hello: "!include project-a/mkdocs.yml"

and the following mkdocs.yml in a subfolder of the monorepo

site_name: "test"
site_description: "This is a subdomain site."

plugins:
  - monorepo

And I got this error:

_The file path .... does not contain a valid 'nav' key in the YAML file and the docs folder is not the default one, i.e. docs. Please include the nav key to indicate how your documentation should be presented in the navigation, or include a 'docsdir' to indicate that automatic nav generation should be used.

I personally find useless to specify the key docs_dir when it is the default one, i.e. docs.
I would like to have the automatic nav generation without having to specify the docs_dir key

dariocurr commented 1 year ago

Solved with https://github.com/backstage/mkdocs-monorepo-plugin/pull/82