Add support for stable doc URLs (#342)
authorWismill <dev@wismill.eu>
Sun, 14 May 2023 13:11:15 +0000 (15:11 +0200)
committerGitHub <noreply@github.com>
Sun, 14 May 2023 13:11:15 +0000 (15:11 +0200)
commit64aaa7cda29196a9142dc8785c29201468429fe8
treee8b0eab4da9ba6eb573751edd0cb46ef637bcb35
parentfc664cf1cc8c1cccd6137134cf5018d8fc9b1ca5
Add support for stable doc URLs (#342)

Doc URLs may change with time because they depend on Doxygen machinery.
This is unfortunate because it is good practice to keep valid URLs
(see: https://www.w3.org/Provider/Style/URI.html).

I could not find a built-in solution in Doxygen, so the solution proposed
here is to maintain a registry of all URLs and manage legacy URLs as
redirections to their canonical page.

This commit adds a registry of URLs that has three functions:
- Check no previous URL is now invalid.
- Add aliases for moved pages.
- Generate redirection pages for aliases. The redirection works with
  a simple <meta http-equiv="refresh"> HTML tag. See:
  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv

This commit also initialize the URLs registry with current pages and some
redirections needed after recent documentation refactoring.

Finally, the CI is updated to catch any change that invalidate previous
URLs.
.github/workflows/linux.yml
.github/workflows/macos.yml
doc/cool-uris.yaml [new file with mode: 0644]
meson.build
scripts/ensure-stable-doc-urls.py [new file with mode: 0755]