mkdocs / mkdocs-redirects

Open source plugin for Mkdocs page redirects
MIT License
181 stars 28 forks source link

applying redirect maps from a file. #68

Open patrikwm opened 1 week ago

patrikwm commented 1 week ago

Is it possible to read the redirect_map from a file?

somehting similar to this.

plugins:
  - redirects:
    redirect_map_file: my_redirects.yml

and then the my_redirects.yml file will contain.

redirect_maps:
  "my_old_url.md": "cool_page/my_new_url.md"
  "my_old_url2.md": "cool_page/my_new_url2.md"
  "my_old_url3.md": "cool_page/my_new_url3.md"

This would help when there are a lot of old urls that are removed or should be pointing at something new. Else the mkdocs.yml will be really big.

pawamoy commented 1 week ago

It's not possible yet, but there's a PR here: https://github.com/mkdocs/mkdocs-redirects/pull/57. Note that I'm only a passer-by maintainer and don't have the time to review and maintain new features, so I probably won't merge it myself.