Skip to content

Commit

Permalink
Merge pull request #6150 from GuillaumeDesforges/doc/builtins-functio…
Browse files Browse the repository at this point in the history
…n-anchor

Add anchor to builtin functions in HTML documentation
  • Loading branch information
edolstra committed Feb 24, 2022
2 parents 7ec244a + cfbf9ee commit 3317866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/manual/generate-builtins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ builtins:
concatStrings (map
(name:
let builtin = builtins.${name}; in
"<dt><code>${name} "
"<dt id=\"builtins-${name}\"><a href=\"#builtins-${name}\"><code>${name} "
+ concatStringsSep " " (map (s: "<var>${s}</var>") builtin.args)
+ "</code></dt>"
+ "</code></a></dt>"
+ "<dd>\n\n"
+ builtin.doc
+ "\n\n</dd>"
Expand Down
1 change: 1 addition & 0 deletions doc/manual/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ $(d)/builtins.json: $(bindir)/nix
@mv $@.tmp $@

# Generate the HTML manual.
html: $(docdir)/manual/index.html
install: $(docdir)/manual/index.html

# Generate 'nix' manpages.
Expand Down

0 comments on commit 3317866

Please sign in to comment.