bookdown::html_document2()
vignettes/vignette-muggle.Rmd
vignette-muggle.Rmd
This vignettes documents how you can use bookdown::html_document2()
and tests its compatibility with the subugoetheme against the default.
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.
Will only be rendered correctly in the muggle default version.
This is section ?? (does not work because sections are unnummbered).
But manual links work fine.
Below in table 1, there are some cars.
knitr::kable(x = mtcars[1:5, ], caption = "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 |
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.
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
Default Primary Success Info Warning Danger
<div class="jumbotron">
<h1 data-toc-skip>Hello, world!</h1>
<p>
This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
<div class="alert alert-success" role="alert">
<strong>Well done!</strong>
You successfully read this important alert message.
</div>
Well done! You successfully read this important alert message.
The alert can also be dismissible.
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<strong>Warning!</strong> Better check yourself, you're not looking too good.
</div>>
Warning! Better check yourself, you’re not looking too good.
<div class="panel panel-primary">
<div class="panel-heading">Panel heading</div>
<div class="panel-body">
HTML can be properly indented without being interpreted as markdown code.
Oddly, *some* markdown is still available inside balanced HTML tags.
</div>
<div class="panel-footer">Panel footer</div>
</div>