r-lib / pkgdown

Generate static html documentation for an R package
https://pkgdown.r-lib.org/
Other
718 stars 334 forks source link

suppress a section title from toc #1430

Closed maxheld83 closed 3 years ago

maxheld83 commented 4 years ago

Pandoc >= 2.8 supports excluding some heading by appending the .unlisted class, as in:

# My heading {.unlisted}

By extension, this also seems to work in rmarkdown. I confirmed that this works inside rmarkdown::html_document().

However, pkgdown appears to ignore this setting, and headings inside articles marked as .unlisted are still included in the TOC.

For a rendered example, see https://subugoe.github.io/subugoetheme/articles/html_document.html.

I am guessing this does not work in pkgdown, because pkgdown uses it's own bootstrap TOC thingy, not vanilla pandoc (?).

maxheld83 commented 4 years ago

documented solution / hack-fix in above PR https://github.com/r-lib/pkgdown/pull/1432

hadley commented 3 years ago

Thanks for filing this issue! Unfortunately, developing good software requires relentless focus, which means that we have to say no to many good ideas. Even though I'm closing this issue, I really appreciate the feedback, and hope you'll continue to contribute in the future 😄