Find me on GitHub!

staticdocs

Travis-CI Build Status

staticdocs provides a way to conveniently render R package documentation into html pages suitable for stand-alone viewing, such as on a package webpage. You can see staticdocs in action at http://staticdocs.had.co.nz: this is the output of staticdocs applied to the latest version of staticdocs.

staticdocs is not currently available from CRAN, but you can install the development version from github with:

# install.packages("devtools")
devtools::install_github("hadley/staticdocs")

Features

  • Attractive defaults: staticdocs uses bootstrap to provide an attractive website.

  • Customisable: you can override the default templates to provide alternative rendering

  • Flexible ways to specify the index page so you can group related functions together.

Compared to Rd2html, staticdocs:

  • Makes it easier to customise the output.

  • Runs examples, so users see both input and output.

  • Assumes only one package is being rendered - links to documentation in other packages are forwarded to Rdocumentation.

Help topics

Settings functions

These functions are used in index.r to configure various settings that staticdocs uses when rendering a package. This is particularly useful for generating an index page that groups functions into useful categories

  • sd_icon
    Define the icon for a function.
  • sd_item
    Define an item in a section of the index.
  • sd_section
    Define a section for the index page

Other

  • build_site(build_package, staticdocs-package)
    Build complete static documentation for a package.
  • parse_rd
    Parse an rd file in to staticdocs format.
  • render_page
    Render complete page.
  • to_html
    Convert an rdoc to a list of html components.