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

Resolve symlinks when copying files #842

Closed
wants to merge 1 commit into from

Conversation

rinon
Copy link

@rinon rinon commented Dec 6, 2018

While symlinked directories may cause infinite recursion when copying files,
symlinked files shouldn't be a problem. This change copies the resolved
destination of the symlink in place of the symlink file itself, which will
preserve any references to the symlinked file in the rendered output.

While symlinked directories may cause infinite recursion when copying files,
symlinked files shouldn't be a problem. This change copies the resolved
destination of the symlink in place of the symlink file itself, which will
preserve any references to the symlinked file in the rendered output.
@rinon
Copy link
Author

rinon commented Jan 2, 2019

Is this change something people want? We're using this to build a manual with sections symlinked from their existing locations in the repository. Seems like this would be a useful thing for others as well (plus I'd love to not need custom tooling to build our manual 😃).

@rinon
Copy link
Author

rinon commented Feb 7, 2019

ping?

@sytsereitsma
Copy link

I solved this differently by adding an additional resources section to book.toml (nearly ready for filing a pull request, struggling with the serve command on this). The user can add zero or more sections like the following:

[[output.html.additional-resources]]
output-dir="img" # Relative to book output dir
src="../plantuml/*.png" # Relative to working dir/book.toml dir

It allows more granular control over the files you wish to import from external directories and it can be committed without having to check in symlinks.

Would that work for your case too?

Regards,

Sytse

@rinon
Copy link
Author

rinon commented Apr 30, 2019

@sytsereitsma Unfortunately I don't think that would help me. I'm actually using symlinks to the markdown files themselves, not just HTML resources.

@ehuss
Copy link
Contributor

ehuss commented Sep 22, 2020

I think this is now resolved via #1323.

@ehuss ehuss closed this Sep 22, 2020
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 this pull request may close these issues.

3 participants