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

add support for golang vanity url #126

Closed rchincha closed 1 year ago

rchincha commented 1 year ago

https://github.com/jimporter/mike/blob/49cf9c8925d86847b6dbfbf82ce6fa4aa428e4e0/mike/templates/redirect.html#L7

https://medium.com/@JonNRb/making-a-golang-vanity-url-f56d8eec5f6c

jimporter commented 1 year ago

You should be able to do this the same way you might add a CNAME file to your docs: https://github.com/jimporter/mike#cname-and-other-special-files

Or, if you prefer to do this within existing files, you can supply your own templates via redirect_template in your config or --template on the command line.

rchincha commented 1 year ago

https://github.com/jimporter/mike/blob/master/mike/templates/redirect.html ^ this?

If I have / -docs/ -template/my-redirect.html

So in the plugin config redirect_template: template/my-redirect.html

^ would this work?

jimporter commented 1 year ago

If you're on the latest dev builds, yes. On the 1.x releases, you'll need to use --template on the command line.

rchincha commented 1 year ago

works, thx