Creates a New Data Science Portfolio Website
new_portfolio_site.Rd
Generates the default hugo template skeleton for a Portfolio-Based Data Scientist Website
Provides 2 starter portfolio templates:
raditian
andkross
.
Usage
new_portfolio_site(
dir = ".",
force = NA,
install_hugo = TRUE,
sample = FALSE,
format = "yaml",
theme = c("raditian", "kross"),
theme_example = TRUE,
netlify = TRUE,
...
)
Arguments
- dir
The directory of the new site.
- force
Whether to create the site in a directory even if it is not empty. By default,
force = TRUE
when the directory only contains hidden, RStudio project (*.Rproj
),LICENSE
, and/orREADME
files.- install_hugo
Whether to install Hugo automatically if it is not found.
- sample
Whether to add sample content. Hugo creates an empty site by default, but this function adds sample content by default.
- format
The format of the configuration file, e.g.,
'yaml'
or'toml'
(the valueTRUE
will be treated as'yaml'
, andFALSE
means'toml'
). Note that the frontmatter of the new (R) Markdown file created bynew_content()
always uses YAML instead of TOML or JSON.- theme
The theme can be defined in several ways.
Preset themes
raditian
(default): Custom version of the free hugo raditian themekross
: Custom version of the free hugo kross theme
A Hugo theme on Github
A character string of the form user/repo
A GIT branch or tag name after @, i.e. theme can be of the form user/repo@branch).
A full URL to the zip file or tarball of the theme.
No Theme
If
theme = NA
, no themes will be installed, and you have to manually install a theme.- theme_example
Whether to copy the example in the
exampleSite
directory if it exists in the theme. Not all themes provide example sites.- netlify
Whether to create a Netlify config file
netlify.toml
.- ...
Additional arguments can be passed to
blogdown::new_site()
.