gitbook_config() is a helper function to specify the config argument in bookdown::gitbook(), as described in the bookdown book.

gitbook_config(
  toc_collapse = yml_blank(),
  toc_scroll_highlight = yml_blank(),
  toc_before = yml_blank(),
  toc_after = yml_blank(),
  toolbar_position = yml_blank(),
  edit = yml_blank(),
  download = yml_blank(),
  search = yml_blank(),
  fontsettings_theme = yml_blank(),
  fontsettings_family = yml_blank(),
  fontsettings_size = yml_blank(),
  sharing_facebook = yml_blank(),
  sharing_twitter = yml_blank(),
  sharing_google = yml_blank(),
  sharing_linkedin = yml_blank(),
  sharing_weibo = yml_blank(),
  sharing_instapaper = yml_blank(),
  sharing_vk = yml_blank(),
  sharing_all = yml_blank(),
  ...
)

Arguments

toc_collapse

Collapse some items initially when a page is loaded via the collapse option. Its possible values are "subsection" (the default), "section", "none", or NULL.

toc_scroll_highlight

Logical. Enable highlighting of TOC items as you scroll the book body? The default is TRUE.

toc_before, toc_after

a character vector of HTML to add more items before and after the TOC using the HTML tag <li>. These items will be separated from the TOC using a horizontal divider.

toolbar_position

The toolbar position: "fixed" or "static." The default ("fixed") is that the toolbar will be fixed at the top of the page, whereas when set to "static" the toolbar will not scroll with the page.

edit

If not empty, an edit button will be added to the toolbar.

download

This option takes either a character vector or a list of character vectors with the length of each vector being 2. When it is a character vector, it should be either a vector of filenames or filename extensions. When you only provide the filename extensions, the filename is derived from the book filename of the configuration file _bookdown.yml

search

Include a search bar?

fontsettings_theme

The theme. "White" (the default), "Sepia", or "Night".

fontsettings_family

The font family. "sans" (the default) or "serif".

fontsettings_size

The font size. Default is 2.

sharing_facebook

Logical. Include Facebook share link? Default is TRUE.

sharing_twitter

Logical. Include Twitter share link? Default is TRUE.

sharing_google

Logical. Include Google share link? Default is FALSE.

sharing_linkedin

Logical. Include LinkedIn share link? Default is FALSE.

sharing_weibo

Logical. Include Weibo share link? Default is FALSE.

sharing_instapaper

Logical. Include Instapaper share link? Default is FALSE.

sharing_vk

Logical. Include VK share link? Default is FALSE.

sharing_all

Logical. Include all share links? Default is FALSE.

...

additional named R objects, such as characters or lists, to transform into YAML

Value

a list to use in the config argument of bookdown::gitbook()

See also

Other bookdown: yml_bookdown_opts()