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
Ignore broken symlinks in mkdocs serve. #639
Comments
Interesting, I think we will want to add an extra check in the file discovery to check is the file is a symlink and then check that the target is valid. If it isn't we can ignore it. We can probably do this with a combination of |
Thanks so much! This will make my mkdocs life easier.
|
Happy to help :) |
First I'd like to point out that I like this project quite much and currently implement mkdocs for our internal repository. Unfortunately I've stumbled on an issue caused by the way this bugfix handles symbolic links. It looks like symbolic links with relative path are not processed properly. Sample tree (lets assume path
Neither It looks like this happens because the CWD is different from Diff for
This could be probably written a bit nicer so I'm just pasting the diff here. PS. I'm using mkdocs installed via |
@ky4n this sounds like a legitimate issue with a reasonable solution. Unfortunately, you risk it getting forgotten as you commented on a closed issue. It would have been better to create a new issue which links to this one for context. Actually, as you have a provided fix, a pull request would be the quickest way to have the fix applied. |
@d0ugal Thank you, works like a charm. |
What I am experiencing:
index.md
in Emacs, Emacs creates files like:What I expect:
somethingelse.md
and press save, I expect the mkdocs livereload to reload the browser.What I see instead:
What I propose:
mkdocs
build should continue as if the file does not exist. Note that this arguably is a special-case to handle Emacs' own weirdness; a different way to do it would be to look at the list of git ignored files.mkdocs
should issue a warning (not an error) on broken symlinks, gracefully ignoring them.I'm open to a bunch of ideas. I wanted to file this in the hopes of sparking a discussion where the maintainers of mkdocs could express their opinion about the best way forward.
Thanks so much! Also hi! I'm twitter.com/asheeshlaroia and was chatting with a mkdocs developer earlier today. Seems like a great project! I learned about it via http://ericholscher.com/blog/2014/feb/27/how-i-judge-documentation-quality/ !
The text was updated successfully, but these errors were encountered: