The {svPkgdown} package provides a custom style for SciViews R package sites generated automatically with {pkgdown}. Please don’t use it unmodified for your own purpose outside of the https://www.sciviews.org web site (but you can reuse it as a starting point from your own template if you wish)!
Inspired by tidytemplate, lockedatapkg and rotemplate.
Being specific to SciViews packages, {svPkgdown} will never be available from CRAN. You can install it from the SciViews R-Universe this way:
install.packages(c('svPkgdown', 'pkgdown'),
repos = c('https://sciviews.r-universe.dev', 'https://cloud.r-project.org'))
You can install the latest version of {svPkgdown} from GitHub. Make sure you have the {devtools} R package installed:
install.packages("remotes")
Use install_github()
to install {svPkgdown} from GitHub (source from main branch will be recompiled on your machine):
remotes::install_github("SciViews/svPkgdown")
R should install all required dependencies automatically, and then it should compile and install {svPkgdown}.
Starting from a GitHub repository for an R package with no {pkgdown} site yet,
remotes::install_github("r-lib/usethis")
if needed.usethis::use_pkgdown()
then, pkgdown::build_site()
to view how it renders with all defaults.docs
and docs/
in .gitignore
to avoid pushing your local version of the site to GitHub._pkgdown.yml
. For SciViews, a custom template is used by means of this {svPkgdown} package, based on the bootstrap spacelab
template. You may also place additional information for the authors, for instance:url: https://www.sciviews.org/svPkgdown
destination: docs
development:
mode: auto
template:
package: svPkgdown
bootstrap: 3
bootswatch: spacelab
params:
mathjax: true
bslib:
pkgdown-nav-height: 80px
code_font: {google: "JetBrains Mono"}
toc:
depth: 3
navbar:
structure:
left: [intro, reference, articles, tutorials, news]
right: [search, github]
home:
strip_header: true
authors:
Philippe Grosjean:
href: https://phgrosjean.sciviews.org/
pkgdown::build_site()
, or from RStudio, from the corresponding addin. Check its appearance.usethis::use_github_action("pkgdown")
.README.md
file).Further explanations on how to customize the {pkgdown} site here.
You can get further help about this package this way:
library(help = "svPkgdown")
package?svPkgdown
vignette("svPkgdown") # None is installed with install_github()
For further instructions, please, refer to the related web site at https://www.sciviews.org/svPkgdown/.
Please note that the {inferit} package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.