Docs editURL assumes `docs/` base path
See original GitHub issue🐛 Bug Report
The editUrl
built as part of doc metadata assumes that the base path for the docs source matches the local paths (e.g. always processed with docs/
). This may not always be the case if the content is coming from a separate repo.
As an example: placeos/docs, which then maps into place-technology/website as a submodule. Setting editUrl
in the config to https://github.com/placeos/docs/edit/master/
results in all edit links generating https://github.com/placeos/docs/edit/master/docs/
as the base path.
edit: cross-repo dependency in linked example is now via npm for better build support, but same issue still exists.
In v2 there does not look to be a way to override this behaviour. What seems to be the old behaviour seems preferable for flexibility.
Have you read the Contributing Guidelines on issues?
yes
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
Hey @fanny, the limitation is that it tightly binds the docs source and website repos.
Here’s an example config:
(from here)
The docs repo is just a set of markdown files that can be separately maintained. This allows them to be used as part of the site, but also in other distribution channels.
Using an
editUrl
that allows for specifying the full base path enables this style of setup.@slorber Found the answer in https://github.com/facebook/docusaurus/issues/3152#issue-667570288
I had modified the
routeBasePath
, but not thepath
setting, which explains wheredocs
was coming from.I updated my comment above and will send a PR later to clarify the docs.