Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Support for mono-repo that use symlinks #121

Open
bartvandenende-wm opened this issue Jan 8, 2024 · 0 comments · May be fixed by #122
Open

[feature] Support for mono-repo that use symlinks #121

bartvandenende-wm opened this issue Jan 8, 2024 · 0 comments · May be fixed by #122

Comments

@bartvandenende-wm
Copy link

bartvandenende-wm commented Jan 8, 2024

Summary

Request to add support for mono-repos that use symlinks

Details

We are exploring the usage of mkdocs for a typescript mono-repo that uses symlinks via pnpm package manager to link packages.

An example folder tree structure would be

- docs/*.md
- node_modules/{package-name}/mkdocs.yml << {package-name} is a folder symlink
- mkdocs.yml

with a mkdocs.yml config:

nav:
  - Intro: 'index.md'
  - Libraries: '*include ./node_modules/*/mkdocs.yml'

Unfortunately the above config does not work as mkdocs-monorepo-plugin resolves the symlinks to absolute paths which are outside of the project directory.

I was curious if there is a need to resolve symlinks for the plugin and if the below two resolve actions?

site[str(mkdocs_config)] = f"{INCLUDE_STATEMENT}{mkdocs_config.resolve()}"

site[site_name] = f"{INCLUDE_STATEMENT}{mkdocs_config.resolve()}"

Proposal

A suggested change proposal would be to update the above path method .resolve() to .absolute(), which still resolves the absolute path but does not resolve the symlink per https://docs.python.org/3/library/pathlib.html#pathlib.Path.absolute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant