jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
528 stars 47 forks source link

Absolute links break site? #115

Closed magnusg-sa closed 1 year ago

magnusg-sa commented 1 year ago

Do I understand correctly that Mike does not work with absolute links?

For example, if the page http://mydocs.com/4.14/basic-functions/ has a link

Navigate to [Docs->Topics](/topic) for...

That should take the user to http://mydocs.com/4.14/topic, but instead it takes the user to http://mydocs.com/topic which of course does not exist. So my question is: does Mike only work with relative links? Or am I missing some vital detail in the documentation?

jimporter commented 1 year ago

Yeah, that's the expected behavior. An absolute path would resolve relative to the root of your domain. This isn't a mike-specific issue though, since MkDocs itself strongly recommends the use of relative paths for links: https://www.mkdocs.org/user-guide/writing-your-docs/#linking-to-pages

magnusg-sa commented 1 year ago

That's very unfortunate. Thank you for your swift reply!