nix-pills icon indicating copy to clipboard operation
nix-pills copied to clipboard

Update anchor to `recursive sets` in nix manual.

Open wathiede opened this issue 4 years ago • 6 comments

wathiede avatar Sep 01 '20 04:09 wathiede

Do you know how the recursive set ID is generated in the Nix manual? I'm not sure this ID is actually stable. Maybe we should first explicitly set this anchor in the Nix manual.

nlewo avatar Sep 05 '20 16:09 nlewo

Yeah, it is non-deterministic. And Nix manual has been ported to Markdown so all links will be broken now anyway :scream_cat:

jtojnar avatar Sep 06 '20 01:09 jtojnar

Is the version live at https://nixos.org/manual/nix/stable/ the 'ported to Markdown' version, or an 'old' version?

I ran https://github.com/linkchecker/linkchecker and pointed it to https://nixos.org/manual/nix/stable/ with the following config:

[output]
status=1
fileoutput = text,csv 
[text]
filename=linkchecker-out.txt
[gml]
[dot]
[csv]
filename=linkchecker-out.csv
[sql]
[html]
[blacklist]
[xml]
[gxml]
[sitemap]
[checking]
[filtering]
checkextern=1
[authentication]
[AnchorCheck]

It reports 44 broken links/anchors, which isn't too bad. If the version live at https://nixos.org/manual/nix/stable/ is the markdown version, I'm happy to submit some PRs to https://github.com/NixOS/nix to add stable anchors to the things currently pointing to unstable anchors, and clean up all the rest (it looks like there's a number of links that go through a redirect from /nixpkgs/manual/ to /manual/nixpgs/stable/ and linkchecker doesn't like this).

This PR started as something I saw broken while reading through the pills, but I'm happy to do the larger cleanup if you want.

If the markdown version isn't what is live at https://nixos.org/manual/nix/stable/ then maybe there's a much bigger breakage coming, and I'll leave that cleanup to whomever is rolling out the port to markdown.

wathiede avatar Sep 07 '20 00:09 wathiede

https://github.com/NixOS/nix/pull/3857 has only been merged recently so it is not available on the website AFAIK. Unfortunately it will break all links.

jtojnar avatar Sep 07 '20 01:09 jtojnar

Ok, sounds like this change isn't very useful. Thanks for the additional context and link.

wathiede avatar Sep 07 '20 15:09 wathiede

Perhaps we should point it to the unstable manual: https://nixos.org/manual/nix/unstable/expressions/language-constructs.html#recursive-sets

jtojnar avatar May 16 '21 16:05 jtojnar