mkdocs-redirects icon indicating copy to clipboard operation
mkdocs-redirects copied to clipboard

Use symlinks in docs/ to configure redirects?

Open osresearch opened this issue 5 years ago • 2 comments

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.

osresearch avatar Apr 18 '20 10:04 osresearch

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.

ghost avatar Jul 14 '20 15:07 ghost

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.

ktomk avatar Oct 01 '20 22:10 ktomk