Skip to contents

Create a repository for a static website for data documentation and exploration.

Usage

init_site(dir, title = "app", template = "mtcars", with_data = FALSE,
  node_project = FALSE, include_api = FALSE, overwrite = FALSE,
  quiet = !interactive())

Arguments

dir

Directory in which to create the site's structure. Will be created if it does not exist.

title

Title of the site.

template

Name of a template to use, which are pre-constructed site.R and build.R files. If FALSE or not found, no such files will be made.

with_data

Logical; if TRUE, a data sub-directory and datapackage will be created.

node_project

Logical; if TRUE, includes files used to run the site from a Node.js server.

include_api

Logical; if TRUE, will make a netlify.toml config file to specify the function directory for the API function, if included by site_build.

overwrite

Logical; if TRUE, will overwrite existing site files in dir.

quiet

Logical; if TRUE, suppresses messages and does not navigate to the file when finished.

Value

Path to the created site directory.

Examples

if (FALSE) {
# initialize site in the current working directory
init_site(".")
}