Learn R Programming

blogdown (version 1.19)

install_theme: Install a Hugo theme from Github

Description

Download the specified theme from Github and install to the themes directory. Available themes are listed at https://themes.gohugo.io.

Usage

install_theme(
  theme,
  hostname = "github.com",
  theme_example = FALSE,
  update_config = TRUE,
  force = FALSE,
  update_hugo = TRUE
)

Arguments

theme

A Hugo theme on Github (a character string of the form user/repo, and you can optionally specify a GIT branch or tag name after @, i.e. theme can be of the form user/repo@branch). You can also specify a full URL to the zip file or tarball of the theme. If theme = NA, no themes will be installed, and you have to manually install a theme.

hostname

Where to find the theme. Defaults to github.com; specify if you wish to use an instance of GitHub Enterprise. You can also specify the full URL of the zip file or tarball in theme, in which case this argument is ignored.

theme_example

Whether to copy the example in the exampleSite directory if it exists in the theme. Not all themes provide example sites.

update_config

Whether to update the theme option in the site configurations.

force

Whether to override the existing theme of the same name. If you have made changes to this existing theme, your changes will be lost when force = TRUE! Please consider backing up the theme by renaming it before you try force = TRUE.

update_hugo

Whether to automatically update Hugo if the theme requires a higher version of Hugo than the existing version in your system.