Skip to content

Commit

Permalink
Add anchors to reference index + arguments heading in reference
Browse files Browse the repository at this point in the history
Fixes #1747
  • Loading branch information
hadley committed Sep 22, 2021
1 parent aac98c3 commit b6cd072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/build-reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ build_reference_index <- function(pkg = ".") {

html <- xml2::read_html(file.path(pkg$dst_path, "reference/index.html"))
tweak_all_links(html, pkg = pkg)
tweak_anchors(html)
xml2::write_html(html, file.path(pkg$dst_path, "reference/index.html"))

invisible()
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/BS4/content-reference-topic.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1 class="display-4">{{{title}}}</h1>
{{/usage}}

{{#has_args}}
<h2>Arguments</h2>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments" aria-hidden="true"></a>Arguments</h2>
<dl class="row" id="ref-arguments">
{{#arguments}}
<dt class="col-sm-3 section level2" id="pkg-arg-{{{name}}}">{{{name}}}</dt>
Expand Down

0 comments on commit b6cd072

Please sign in to comment.