The index.html
is required for the homepage of the website and will be automatically
generated if not provided. Any project defined
index.*
file will be added to the default content. It is recommended to include at most one index.*
file per project.
Scikick allows users to add output format metadata in the scikick.yml file. For the default site building method (using rmarkdown::render_site
) the scikick.yml is passed to _site.yml
files allowing sections such as:
output:
html_document:
code_folding: hide
highlight: zenburn
theme: journal
template: default
toc: true
toc_float: true
number_sections: false
toc_depth: 5
self_contained: true
To be recognized by rmarkdown::render
. This has only been tested with html_document outputs. Other formats may require further accomodations.
For Rmd/R execution, Scikick over-rides the following knitr settings:
::opts_chunk$set(list(
knitr#################
# Visuals
#################
dpi = 100,
fig.width = 10,
fig.height = 10,
# Causes knitr to use HTML img tags which do not allow fig.cap usage
# users may set this if they prefer high-res images over figure caption usage
# fig.retina = 2,
# Needed to ensure only user-specified captions show
fig.cap="",
fig.pos = "center",
#################
# Code reporting
#################
echo = TRUE, # Need true to work with render step HTMLlook$code_folding
error = FALSE,
comment = NULL,
message = FALSE, # Messages sent to stderr
results = TRUE,
warning = FALSE, # Warnings sent to stderr
################
# Execution behaviour
###############
# prevent interactive plots from being turned into PNGs
screenshot.force = FALSE,
# Prevent two rmds from clashing figure names in figure/
fig.path = paste0("figure/",input_noext,"/"),
cache.path = paste0(outdatadir, "/cache/")
))options(width=105) # wider display of prints than default
# package options
::opts_knit$set(list(root.dir = wd, base.dir = dirname(output))) knitr
These can be further over-ridden by users in each notebook and it is suggested to do so in a project-wide env.R
file or similar which is imported in each notebook as needed.
If using Rstudio, default interactive code execution will be relative to the Rmd file location (instead of the project root). This
can be changed to match scikick behaviour by going to Tools > Global Options > Rmarkdown > Evaluate chunks in directory
and setting to “Current”. “Current” should be the project root (scikick.yml directory).
Additionally, the “knit” button can be used for prototyping if set to execute from the project directory.
More details here.
Scikick allows for hierarchical file structure of Rmd. This is highly useful for
organization and used by Scikick for the website layout.
This use of hierarchy may not support some md
conversion features of rmarkdown::render
.
Use of Jupyter Notebooks (i.e., .ipynb
) in Scikick is experimental and requires that Jupyter is installed.
report/
generated by scikickreport/
out_md/*.md
- markdown files that were generated from script execution.out_md/_site.yml
- YAML file specifying the structure of the to-be-created websiteout_md/knitmeta/
- contains RDS files describing required javascript libraries for the final HTML.out_html/
- contains the resulting HTML filessk add -d
is used to add all dependencies even though “dependency” can have two meanings. Typically everything behaves
as one would expect. Internally dependency type is represented as:
Internal dependencies - code or files the Rmd uses directly during execution
External dependencies - code that must be executed prior to the page
Scikick assumes that a script dependency that has also been configured to execute (i.e. sk add <dependent page>
) is an external dependency and must be executed before the script. Otherwise it is assumed the script must execute after changes to the dependency.