-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Symlinks to subdirectories in docs folder do not work, and produce unintuitive error messages #10751
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
Comments
As far as I remember from an old issue (#3272) we only support symlinks on the root docs folder, not subdirectories/files. Since then, it's been a while since we haven't had any symlink issue, so the traction for this is probably low. Curious to know more about the use case so that we figure out if it's worth supporting. If you are assembling multiple repositories docs into one unified docs site, have you considered just copying the docs over as part of your build process, or using multiple docs plugin instances? Your error message shows an SSG build error, but does it work in dev mode? |
The use case is a bunch of components for a larger overall project, each in their own private repo. The all-docs repo is a sibling to those other ones, and the idea was to gather all the docs directories from each of the components into the docs subdir of the all-docs repo, and then do one big docusaurus run to generate an overall project doc site. The workflow runs a script that does git clone operations of all of the sibling component repos. To save time/space, I tried doing symlinks from those clones' doc directories. That didn't work (obviously), and after some digging I found mention of a symlink problem that yielded some similar behavior. I changed the symlinks to copy operations, and it is working as expected now. Making the symlinks work certainly falls into the WIBNI category, but more importantly, at a minimum there should be a 'we don't do symlinks' error thrown instead of the current behavior. |
That actually would be my preference. I tried this approach initially, but I couldn't get it to work since in this case the plugin is trying to access a sibling repo that is private. At some point there is a raw GET issued that does not include any auth info, and the request fails. I think the 'list the files in the dir' part worked, but the actual GET of the files was the part that was failing. This works great for the open source part of the project, since that is all public access, and those GET operations work. |
|
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Docusaurus does not handle symlinks to directories inside the docs directory. The error message that is displayed does not help track down the problem.
This situation arose when trying to create a workflow that did a git clone on several private sibling repos into the project base directory, and then creating symlinks for the various 'docs' directories in those clones to subdirs in the project base 'docs' directory.
Reproducible demo
No response
Steps to reproduce
Steps to reproduce:
If you change the symlink to a copy command, everything works as expected
Expected behavior
I expected that the documents in the symlink'ed directories would be processed as if they were just normal subdirectories and files.
Actual behavior
Every file generated the following error:
Your environment
Self-service
The text was updated successfully, but these errors were encountered: