NixOS / nix.dev

Official documentation for getting things done with Nix.
https://nix.dev
Creative Commons Attribution Share Alike 4.0 International
2.26k stars 238 forks source link

Missing `rec-expression` anchor redirect and inquiry into redirect logic #971

Closed stablejoy closed 1 week ago

stablejoy commented 2 months ago

Observations

I was searching to learn about rec as an anti-pattern and then at https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293 I found a permalink that leads to page not found.

Problem

When I look at the _redirect file from nix.dev this line /anti-patterns/language /recipes/best-practices 301 looks confusing to me since /best-practices should be under /guides and not /recipes. The netlify doc that explains the syntax for the _redirects file says:

In a _redirects file, each redirect rule must be listed on a separate line, with the original path followed by the new path or URL.

So why does the new path as well looks like anchor redirect? This particular redirect has been added in https://github.com/NixOS/nix.dev/pull/633

When I go to the new redirect https://nix.dev/recipes/best-practices it redirects the recipes to guides.

Approaches Maybe the new redirect is being redirected to the correct place somewhere else in the file. I'm looking into it

Willing to help? Always

Priorities

Add :+1: to issues you find important.