mkdocs / mkdocs-redirects

Open source plugin for Mkdocs page redirects
MIT License
176 stars 25 forks source link

Use symlinks in docs/ to configure redirects? #13

Open osresearch opened 4 years ago

osresearch commented 4 years ago

An alternate way to configure the redirections would be to use symlinks in the docs/ directory. That way it would not require editing the mkdocs.yaml file for every redirect and might be an easier way to manage the files.

ghost commented 4 years ago

Personally, I'm not sure about this. I have many redirects configured at the moment (300+) and I prefer to have them explicitly configured on a centralized location. It also makes it easier to see the changes to the redirects in the git history.

ktomk commented 3 years ago

I'm using symbolic links to create the docs/ (docs_dir) content as the repository file-layout is not inherently compatible with the docs/ (docs_dir) base in Mkdocs. This works very well with Mkdocs and turning all those into redirects would not work.

So to answer your question raised with this issue: No, do not use symlinks in docs/ to configure redirects as they first of all work for the actual content which is incompatible with redirects.

To generalize: Such a change would break compatibility with Mkdocs. Symbolic links have a different meaning for Mkdocs already, it is not possible to use them as redirects as well.

Please let me know if you think this is an over-generalization.