jimporter / mike

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

Redirects with images don't seem to work #157

Closed josham closed 1 year ago

josham commented 1 year ago

Summary

If I clone this repo https://github.com/squidfunk/mkdocs-material-example-versioning and deploy:

mike deploy --update-aliases 0.1 latest
mike set-default latest
mike serve

The redirects seem to work with pages but not images, e.g.

Visiting http://localhost:8000/latest/bar/ redirects to http://localhost:8000/0.1/bar/. However, visiting http://localhost:8000/0.1/assets/images/favicon.png works but http://localhost:8000/latest/assets/images/favicon.png gives 404:

image

jimporter commented 1 year ago

That would probably work on the latest dev build if you use symlinks for aliases (which will become the default in 2.0), but for redirect-style aliases (the default in 1.x), this is unsupported.

However, it's not clear to me what version of mike you're using. In the future, please fill out all of the entries you can in the bug reporting template.