Description
Following up the discussion in #24451 (comment) and addressing the concerns of merging the PRs of #24499.
The problem is that we've moved many documentation pages (all the API pages, release.rst
...) we'd like to move many more (almost every page). And we've got two options if we've been discussion so far are:
- Break all the links in search engines, stack overflow, blog posts... linking to the old locations.
- Add more complexity to the build simiar to https://github.com/pandas-dev/pandas/blob/master/doc/source/conf.py#L246 (which IMO is already quite complex, and just works for specific cases)
After thinking more on it, I think we can build a simpler redirect system than what we have, and keep redirects while reducing the complexity of the build.
What I'd do is create a file (e.g. doc/source/redirects.csv
) containing the urls of the the old and new url (a line could look like io,user_guide/io
or generated/pandas.DataFrame.to_parquet,api/reference/DataFrame/pandas.DataFrame.to_parquet
)
Then, in doc/source/conf.py
we open and iterate the file, and create a simple html in the old location with a link to the new. May be later we can use a nice template and a javascript that automatically redirects, but I'd keep it simple to start with.
If a page is splitted, we can have more than two columns in the csv (e.g. io,user_guide/io_plain,user_guide/io_binary
), and show the two links in the redirect page.
I'd also move the current API redirect system to this, and we'd simplify conf.py
.
@jorisvandenbossche @TomAugspurger does this sound good?