This vignettes documents how you can use bookdown::html_document2() and tests its compatibility with the subugoetheme against the default.

Test Content

Omitting Headings

Pkgdown currently does not support omitting arbitrary headings from the table of contents (TOC) in a documented way (see #1430). As a hack-job, you can pass a data attribute to the heading in plain HTML, which will be picked up by bootstrap-toc. Remember that this hack depends on the current implementation of pkgdown and may break without notice.

This chunk produces the below heading skipped from the TOC.

A `data-toc-skip`ped Section

Bookdown Features

Will only be rendered correctly in the muggle default version.

Crossreferences

Sections

This is section ?? (does not work because sections are unnummbered).

But manual links work fine.

Tables

Below in table 1, there are some cars.

knitr::kable(x = mtcars[1:5, ], caption = "A Table With Some Cars")
Table 1: A Table With Some Cars
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2

Plots

The below figure 1 is based on the same cars.

library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_violin(aes(fill = cyl))

A Plot With Some Cars

Figure 1: A Plot With Some Cars

Selected Bootstrap Features

You can use components from bootstrap 3.4.1 for additional styling in vignettes and other sites. You can write this in plain HTML, which gets passed on through to the final website unchanged.

A Leading Paragraph

Fermentum iaculis eu non diam phasellus vestibulum lorem