-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
V.1.2: Markdown links earlier processed as html files, are now processed as directories #2456
Comments
Your finding is correct. Let me expand on this. Regarding links that look like: So your link stays as pointing to a "file" named There is no strict definition or consensus among HTTP servers whether As such, I would not consider this a bug. But I will not go as far as to say that the new behavior is better. |
@oprypin Thanks a lot for this useful clarification! Also the pointer to the documentation started to put some clarity in my mind, about how mkdocs modifies internal links when it generates the html pages. Perhaps, it would be a good idea to give additional details (or examples) on the rules that mkdocs uses, so that we can think with border cases, etc.? |
@oprypin, hello. Found this topic when tried to fix my problem with trailing slash. The question is why the behaviour differs and how to get a redirect to a page with a trailing slash (if it wasn't specified)? For me it's a problem because my current site is viewed without slashes at the end and my app has links to that pages without slashes. And if I move to mkdocs this behavior will break previous versions of the app. |
(Note that generally, when linking from within MkDocs, you must write the links as When hosting the site on a server and linking from elsewhere, these redirects rely on particular behaviors of particular servers. The fact that To put it differently, a deployed MkDocs site is just a collection of HTML files. Of course HTML files themselves cannot define how redirects work on any particular server. The server used by |
You were so fast. I didn't even fast enough to write a comment related to my testing with |
Thanks for your perspectives. I changed the behavior to be as expected here. |
@oprypin cool, thank you too |
The new version brings a curious issue. With versions < 1.2, I used internal links in this way, to make a call to page
bar.md
, from pagefoo.md
:Which was transformed correctly into:
Since version 1.2, the
bar
is intepreted differently bymkdocs serve
, which breaks all such links. I realize this is highly irregular and correct call should have been:So please dont throw rotten tomatoes at me 🍅 .
But just to help me fix this: why this change of behavior? Has some part been reimplemented? Or has this been intentional, to prevent that kind of error in the future?
The text was updated successfully, but these errors were encountered: