find_hugo | R Documentation |
Search for Hugo in a series of possible installation directories (see
install_hugo()
for these directories) with find_hugo()
,
or remove the Hugo executable(s) found with remove_hugo()
.
find_hugo(version = getOption("blogdown.hugo.version"), quiet = FALSE)
remove_hugo(version = getOption("blogdown.hugo.version"), force = FALSE)
version |
The expected version number, e.g., |
quiet |
Whether to signal a message when two versions of Hugo are found:
one is found on the system PATH variable, and one is installed by
|
force |
By default, |
If your website depends on a specific version of Hugo, we strongly recommend
that you set options(blogdown.hugo.version = )
to the version number
you desire in the file .Rprofile
in the root directory of the website
project, so that blogdown can try to find the right version of Hugo
before it builds or serves the website. You can use the function
config_Rprofile()
to do this automatically.
For find_hugo()
, it returns the path to the Hugo executable if
found, otherwise it will signal an error, with a hint on how to install
(the required version of) Hugo. If Hugo is found via the environment
variable PATH, only the base name of the path is returned (you may
use Sys.which('hugo')
to obtain the full path).
If version = 'all'
, return the paths of all versions of Hugo
installed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.