Title: | Extend 'hugodown's markdown document with toc and html boxes. |
---|---|
Description: | hugodownplus extends 'hugodown's md_document with toc and HTML boxes. It allows the use of the arguments 'includes' and 'pandoc_args' which are available in rmarkdown::md_document. |
Authors: | Tim Tiefenbach [aut, cre] , Shafayet Khan Shafee [aut] |
Maintainer: | Tim Tiefenbach <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-11-20 03:19:20 UTC |
Source: | https://github.com/timteafan/hugodownplus |
When called in an Rmd document this function generates child document containing an expandable session info box.
child_session_info(pkgs = c("loaded", "attached", "installed")[1])
child_session_info(pkgs = c("loaded", "attached", "installed")[1])
pkgs |
Which packages to show. It may be:
|
Call this function on a separate line using inline code {r, eval = FALSE, echo = TRUE}r child_session_info()
.
In CSS Use the .session
class to target the whole expandable box.
Use summary.session-header
to target the box header.
Use .session-details
to target the content of the box.
This RMarkdown output format is a drop-in replacement for hugodown::md_document()
.
Like the later, it is designed to generate markdown that is
maximally compatible with Hugo. It intelligently generates a preview so
that you see something useful when Hugo isn't running, but it doesn't
get in the way of hugo's full-site preview when it is.
md_document( toc = FALSE, toc_depth = 3, fig_width = 7, fig_asp = 0.618, use_boxes = FALSE, fig_retina = 2, tidyverse_style = TRUE, standalone = FALSE, includes = NULL, pandoc_args = NULL )
md_document( toc = FALSE, toc_depth = 3, fig_width = 7, fig_asp = 0.618, use_boxes = FALSE, fig_retina = 2, tidyverse_style = TRUE, standalone = FALSE, includes = NULL, pandoc_args = NULL )
toc |
TRUE to include a table of contents in the output |
toc_depth |
Depth of headers to include in table of contents |
fig_width |
Figure width (in inches). |
fig_asp |
Figure aspect ratio, defaults to the golden ratio. |
use_boxes |
TRUE to allow the use of info, warn, and output boxes. |
fig_retina |
Scaling to perform for retina displays. Defaults to
|
tidyverse_style |
Use tidyverse knitr conventions? This sets |
standalone |
Set to TRUE to include title, date and other metadata field in addition to Rmd content as a body. |
includes |
Named list of additional content to include within the document (typically created using the includes function). |
pandoc_args |
Additional command line options to pass to pandoc |
On top of the functionality of hugodown::md_document()
four new arguments are available.
use_boxes
allows the use of expendable html boxes. standalone
, includes
and pandoc_args
are adapted from rmarkdown::md_document()
and allow additional content and command line options.
md_document()
uses a hybrid system for syntax highlighting.
For R code it uses downlit. For
other languages, it relies on Chroma, the syntax highlighter built into
hugo.
For examples of how to include expandable boxes when the use_boxes
argument is set to TRUE
refer to the vignette("customize-boxes", package = "hugodownplus")