opensafely / opensafely/documentation

Consider using mkdocs-redirects plugin over Cloudflare redirects

Open
#1,207 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
48
Forks
10
Avg merge
2d 19h
Merged PRs (30d)
17

Description

https://github.com/mkdocs/mkdocs-redirects

Advantages

  • Configured more explicitly in the MkDocs projects
  • Shouldn't have arbitrary redirect failures, as happened in the past with Cloudflare and was to do with the order of redirects
  • Shouldn't need to ensure the redirects work, unlike Cloudflare (for which we added an automated GitHub Actions check)
  • Independent of the host; so if we move from Cloudflare to something else, we don't need to recreate the redirects.
  • Should work in local preview, which the Cloudflare redirects don't.

Disadvantages

  • No 301 redirects possible — we do use 301 redirects already, although these are perhaps better avoided anyway, in case you want to reuse the URL and because of persistence in browser caching.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked mkdocs-redirects plugin documentation and locating the current Cloudflare redirects plus the GitHub Actions check mentioned in the issue. Compare the existing redirects with the plugin's capabilities; done means the redirects work in local preview and deployment without relying on Cloudflare, with any 301 limitations resolved.

Written by the indexing model from the issue text.

Assessment

Domain
devops, documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.