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.themecan be of the formuser/repo@branch). You can also specify a full URL to the zip file or tarball of the theme. Iftheme = 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 intheme, in which case this argument is ignored.- theme_example
Whether to copy the example in the
exampleSitedirectory if it exists in the theme. Not all themes provide example sites.- update_config
Whether to update the
themeoption 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 tryforce = TRUE.- update_hugo
Whether to automatically update Hugo if the theme requires a higher version of Hugo than the existing version in your system.