How is it possible to create not only first-level but also second-level headers in function reference page of R package documentation created with pkgdown
?
Can I do this by modifying the _pkgdown.yml
file?
More details:
An example of an R package (as a ZIP file) is here.
It contains 3 "hello" and 1 "other" function. I want two <H1>
level (first-level) section "Hello" and "Other" and also "Hello" functions should be split into 2 subsections (level <H2>
) an in the last print-screen.
The project contains _pkgdown.yml
file with these settings that control the appearance of the reference page, and maybe it's possible to tweak this code to get the desired results?:
destination: docs
reference:
# All 3 Hello function should be in a super section A, e.g., level <H1>
- title: "Hello A functions" # This should be subsection A-1, e.g., level <H2>
contents:
- hello-a1
- hello-a2
- title: "Hello B functions" # This should be subsection A-2, e.g., level <H2>
contents:
- hello-b1
# This should be in super section B, e.g., level <H1>
- title: "Other functions"
contents:
- other
The output of the reference page looks like this one:
The type of output I expect should be similar to: