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

Follow symlinks when walking the docs directory #2573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fingolfin
Copy link
Contributor

This way external directories with a bunch of markdown files can be easily included.

This is not a perfect solution but it works surprisingly well in practice. We've been using it for some time in Oscar.jl via some hacky monkey-patching...

This way external files can be easily included.
@fingolfin
Copy link
Contributor Author

@fredrikekre @mortenpi thoughts on this? I could refine it but of course if you outright say "no way", I'll rather not... :-)

@mortenpi
Copy link
Member

mortenpi commented Oct 27, 2024

Sorry for the delay. This seems fine to me to be honest. I also don't expect this to be breaking in practice -- since they don't work, I wouldn't expect any real docs/src directories to actually contain symlinks to directories.

@fredrikekre @odow @goerz, can you foresee any potential issues with this?

If no-one sees any issues with this, then I think it could just use a small test case and a CHANGELOG note.

@fingolfin
Copy link
Contributor Author

@mortenpi thank you. My colleague @aaruni96 will probably take over and work on a changelog and testcase.

For the testcase, we are trying to understand the test setup. From a few minutes looking, my naive idea would be to go into https://github.com/JuliaDocs/Documenter.jl/tree/master/test/examples/src and add a new file symlink.md which is a symlink to one of the other .md files (or a simple new file, or maybe to an .md file in an outside directory). And then perhaps after the docs are built, check if there is a symlink.html and whether its content is identical (or close enough) the the output produced for whatever file the symlink pointed at.

Does that sound plausible? Or any better suggestions? Anything we should watch out for?

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

Successfully merging this pull request may close these issues.

2 participants