nix.dev icon indicating copy to clipboard operation
nix.dev copied to clipboard

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

Open allrealmsoflife opened this issue 1 year ago • 0 comments

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.

  • https://nix.dev/anti-patterns/language.html#rec-expression should lead to https://nix.dev/guides/best-practices#recursive-attribute-set-rec

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.

allrealmsoflife avatar Apr 24 '24 12:04 allrealmsoflife