-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Explain how to link to options in the manual #102246
Comments
I cannot figure out how NixOS/rfcs#72 would affect or improve this. In the example from there, the Can you tell me @mboes? |
A lot of this might change with the common mark rfc |
DocBook elements have semantic definitions but not really a prescribed rendering. You can read their definitions in the DocBook documentation:
Yeah, according to the specification In the default stylesheet we use for rendering DocBook to HTML, the elements are simply rendered as We render the Options appendix as
The ID then can be used across the whole document by either:
There are other options for linking, including a cross-document linking using We could also add a rule to the stylesheet, that would linkify all With the impending |
I found the link to the sources NixOS/rfcs#72 (comment). As mentioned there, only a single file was markdown, the rest was actually the result of a docbook to restructuredtext conversion. Restructuredtext has a lot more metadata. |
I marked this as stale due to inactivity. → More info |
the 21.11 release notes will be written in markdown. Going to close as linking to options (at least in context of dockbook) is no longer relevant. |
We still need to link to options and I have seen someone suggest the incorrect syntax on Matrix yesterday. Currently, it is Linking options in submodules also is not trivial (replace Eventually, I want to use empty links for the automatic anchors (e.g. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2022-10-22-documentation-team-meeting-notes-12-nixcon-edition/22689/1 |
I'm trying to write a release notes entry and spending an unjustified amount of time trying to make the hyperlink to a NixOS option documentation work.
I want to link to
systemd.services.<name>.unitConfig
.Searching in the existing release notes code, I found repeated usage of at least the following patterns, out of which only one works:
<option>networking.interfaces.<name>.useDHCP = true;</option>
<varname>hardware.logitech.lcd.enable</varname>
<varname>
wasn't made for this<literal>security.acme.certs._name_.user</literal>
<literal>
, no hyperlink is created, and that's probably fine given that this is the old value for the option), but it still renders wrong in the manual, namely assecurity.acme.certs._name_.user
<literal>
was used so no link is created)<xref linkend="opt-systemd.network.networks._name_.dhcpV4Config"/>
Thus, only few people seem to know how to link to a NixOS option, so the manual is full of non-working links.
Proposed solution
<option>
even exist if it doesn't link correctly? Is it for command line options? We need to explain it.<nixos-option>
tag that "just works" without escaping and magic prefixes e.g.<nixos-option>systemd.services._name_.unitConfig</nixos-option>
?<literal>
).<option>
,<varname>
,<literal>
are all wrong for this purpose.This should probaly be done in
contributing-to-this-manual.xml
.CC a somwhat arbitrary list of contributers that might be interested/knowledgeable in this: @edolstra @jonringer @jtojnar @doronbehar
The text was updated successfully, but these errors were encountered: