When we decided to move English language lessons from https://elixirschool.com/lessons/ to https://elixirschool.com/en/lessons/
we added the redirect_from directive to every lesson.
for example
en/lessons/advanced/typespec/ has this frontmatter:
---
version: 1.0.2
title: Specifications and types
redirect_from:
- /lessons/advanced/typespec/
---
the problem with this is that when people translate the page, they leave that as it is, and there is one URL that redirects to two different language versions, so the old link is randomly taken over.
My suggestion for the time being is:
---
version: 1.0.2
title: Specifications and types
# PLEASE remove the `redirect_from` directive below if you are translating this lesson
redirect_from:
- /lessons/advanced/typespec/
---
/cc @elixirschool/developers
Thanks for bringing this up @eksperimental. I think #3 would be the easiest. If we want an excuse to write some Elixir an MVP review bot could check for redirect_from and version updates (or lack thereof).
Since only the old English lessons require redirects maybe it makes sense to use redirect_to in the former paths instead? Then the lessons themselves won't have any unrelated parts in front matter and there would be nothing to be accidentally copied into translations.
True! why haven't we thought of that before
I will tackle this
Wonderful, thank you @eksperimental!
Most helpful comment
I will tackle this