mkdocs-monorepo-plugin icon indicating copy to clipboard operation
mkdocs-monorepo-plugin copied to clipboard

Workaround Limitations

Open digitaldonkey opened this issue 6 years ago • 3 comments

Documentation says "site_name must adhere follow the regular expression: ^[a-zA-Z0-9_-/]+$"

My problem with that is that if you also want to single-build the repos you end up with a ugly site_name in the frontend. I wonder if you can introduce a new property like submodule_alias to work around that issue.

You may also autogenerate the machine name (lowercase, replace spaces and strip out special chars) and allow override via custom property. It would improve the "works out of the box" experience and you don't squat site_name prop.

https://github.com/spotify/mkdocs-monorepo-plugin/blob/a252e28a7129010e5e1db05efa08bade3ebb722c/mkdocs_monorepo_plugin/parser.py#L150

https://spotify.github.io/mkdocs-monorepo-plugin/limitations/

digitaldonkey avatar Oct 12 '19 20:10 digitaldonkey

@digitaldonkey This is something we discussed with the idea that it would change later. The reason why we decided that it should adhere to a specific ruleset is to remove the "magic" and add more predictability.

Another point is explaining to other engineers that your site_name does not exactly correlate with the URL would be confusing and difficult, especially because a "normal" site name could easily make a valid (albeit ugly) URL. An example would be: https://localhost/V1%20Documentation/changelog/ where V1 Documentation would be the site_name.

But maybe there's a middle ground where it isn't too magical and doesn't introduce an easily avoidable limitation. Thoughts?

bih avatar Nov 05 '19 12:11 bih

@bih I liked the idea of having introducing a new property like submodule_alias. Could yo comment on that?

dellagustin-sap avatar May 18 '20 11:05 dellagustin-sap

I use my own script to update site_name before to generate documentation. It will search for all !include in root mkdocs.yaml and update them to URL friendly format.

GAS85 avatar Mar 17 '21 12:03 GAS85