jimporter / mike

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

Use symlinks for redirects/aliases by default #92

Closed jimporter closed 2 years ago

jimporter commented 2 years ago

Symlinks work correctly for gh-pages, (the result is similar to the --no-redirect behavior), and would be a better (default) implementation for redirects/aliases. Doing this would essentially eliminate any need for #52, since there'd no longer be a redirect template to keep up to date. It would provide a simple way of implementing #72: just set up a symlink from 404.html to <default-version>/404.html.

ofek commented 2 years ago

Note that symlinks don't work on Windows by default

jimporter commented 2 years ago

They shouldn't need to, since the commit is generated by git fast-import, which can add files to the commit without using the filesystem, and Github itself supports symlinks for gh-pages. That's all that's really necessary.