!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

395 Members
Discussion about documentation improvements around the Nix ecosystem81 Servers

Load older messages


SenderMessageTime
13 Jul 2021
@jtojnar:matrix.orgJan Tojnar so not actual footnotes [link][^1]? 01:01:41
@ryantm:matrix.orgryantmOh, that's a thing in some extension?01:02:33
@jtojnar:matrix.orgJan Tojnar
In reply to @ryantm:matrix.org
Maybe we could avoid "footnote" link magic, but aggregating the "footnote" links across the whole set of documents.
that would be pretty simple by concating the link target definitions to each md file
01:03:06
@jtojnar:matrix.orgJan Tojnarextras would just be ignored01:03:16
@jtojnar:matrix.orgJan Tojnar
In reply to @ryantm:matrix.org
Oh, that's a thing in some extension?
yeah, pandoc supports it
01:03:25
@ryantm:matrix.orgryantm

I just meant the one like this:

[Link][1]
⋮
[1]: http://b.org
01:03:37
@jtojnar:matrix.orgJan Tojnaryou can even use strings instead of numbers01:03:49
@ryantm:matrix.orgryantmRight.01:03:57
@ryantm:matrix.orgryantmSo there could be ones for all the NixOS options, and all the common manpages.01:04:24
@ryantm:matrix.orgryantmThough I guess NixOS options might be xrefs?01:04:48
@jtojnar:matrix.orgJan Tojnaryeah, xref work for options for now 01:05:35
@jtojnar:matrix.orgJan Tojnar I think I still like {manpage}`foo(5)` more compared to something like [][foo(5)], which would still need us to fill in the link text 01:07:53
@jtojnar:matrix.orgJan Tojnarso we would need some way to annotate the anchors that they are manpages01:08:34
@jtojnar:matrix.orgJan Tojnar Or write [`foo(5)`][foo(5)] which is IMO even worse for writers than the MyST role. 01:10:05
@jtojnar:matrix.orgJan Tojnar Something like [](man:foo(5) would bring best of both worlds, I feel, but it is non-standard. 01:12:34
@jtojnar:matrix.orgJan Tojnar * Something like [](man:foo(5)) would bring best of both worlds, I feel, but it is non-standard. 01:12:41
@jtojnar:matrix.orgJan Tojnar * Something like [](man:foo(5)) would bring best of both worlds – easily processable yet simple to type, but it is non-standard. 01:13:53
@jtojnar:matrix.orgJan Tojnar * Something like [](man:foo(5)) would bring best of both worlds – easily processable yet simple to type. But it is non-standard. 01:14:44
@jtojnar:matrix.orgJan TojnarFor others reading this, the PR: https://github.com/NixOS/nixpkgs/pull/13004702:06:18
@blaggacao:matrix.orgDavid Arnold
In reply to @jtojnar:matrix.org
Or write [`foo(5)`][foo(5)] which is IMO even worse for writers than the MyST role.

Have we considered

[`foo(5)`][]

[`foo(5)`]: http://b.org

?

11:08:40
@blaggacao:matrix.orgDavid ArnoldThat's how I would intuitively write it, probably even with a MyST role in place.11:13:55
@blaggacao:matrix.orgDavid ArnoldMaybe aome sort of pre-processor will do that has some sort of mapping for the actual links and adds the last link line.11:15:21
@blaggacao:matrix.orgDavid Arnold* Maybe some sort of pre-processor will do that has some sort of mapping for the actual links and adds the last link line.11:15:56
@blaggacao:matrix.orgDavid Arnold* Maybe some sort of pre-processor would do that has some sort of mapping for the actual links and adds the last link line.11:16:09
@blaggacao:matrix.orgDavid Arnold* Have we considered ```markdown [`foo(5)`][] ⋮ [`foo(5)`]: http://b.org ``` ?11:17:56
@jtojnar:matrix.orgJan Tojnar David Arnold: Interesting, did not realize that the implicit link names were already part of the original Markdown. 12:30:37
@jtojnar:matrix.orgJan TojnarThough linking by “form” feels kind of backwards to me – the empty link text being filled in from the link target automatically is intuitive for me; magically guessing link target from link label feels weird. Granted, I was never fan of reference-style links.12:30:40
@jtojnar:matrix.orgJan Tojnar
In reply to @blaggacao:matrix.org
Maybe some sort of pre-processor would do that has some sort of mapping for the actual links and adds the last link line.
This syntax would currently require concating all md files with the mapping (just like the [][foo(5)] syntax) but resolving would be slightly cleaner – just replace the Str "[", Code …, Str "][]" sequence in AST by Code … (for the links that did not resolve).
12:34:43
@b:chreekat.netbryan Jan Tojnar: what you ask for is what happens with no syntax whatsoever, isn't it? :) A bare url is automatically converted to a link? 12:48:50
@jtojnar:matrix.orgJan Tojnar bryan: not sure I understand – we would have manpage references and the mapping would contain URLs only for some of them 12:51:28

There are no newer messages yet.


Back to Room ListRoom Version: 6