Skip to contents

Use this if you want to rebuild your site from scratch.

Usage

reset_site(path = ".")

Arguments

path

the path to the site

Examples

tmp <- tempfile()
create_lesson(tmp)
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...
#>  No schedule set, using Rmd files in episodes/ directory.
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#> To remove this message, define your schedule in config.yaml or use `set_episodes()` to generate it.
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#> ────────────────────────────────────────────────────────────────────────
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#>  To save this configuration, use
#> 
#> set_episodes(path = path, order = ep, write = TRUE)
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#>  First episode created in /tmp/RtmpR9qKLA/file16e11b675eb8/episodes/introduction.Rmd
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#>  Workflows up-to-date!
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#>  Consent to use package cache provided
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#> → Searching for and installing available dependencies
#> * Discovering package dependencies ... Done!
#> The following packages are used in this project, but not available locally:
#> 
#> 	rmarkdown
#> 
#> renv will attempt to download and install these packages.
#> 
#> * Hydrated 0 packages in 0.0052 milliseconds.
#> * Resolving missing dependencies  ... 
#> Installing digest [0.6.31] ...
#> 	OK [copied cache in 6.6 milliseconds]
#> Installing base64enc [0.1-3] ...
#> 	OK [copied cache in 4 milliseconds]
#> Installing rlang [1.1.0] ...
#> 	OK [copied cache in 6.4 milliseconds]
#> Installing fastmap [1.1.1] ...
#> 	OK [copied cache in 4.6 milliseconds]
#> Installing ellipsis [0.3.2] ...
#> 	OK [copied cache in 4.2 milliseconds]
#> Installing htmltools [0.5.5] ...
#> 	OK [copied cache in 4.5 milliseconds]
#> Installing jsonlite [1.8.4] ...
#> 	OK [copied cache in 6.4 milliseconds]
#> Installing fs [1.6.1] ...
#> 	OK [copied cache in 5.4 milliseconds]
#> Installing R6 [2.5.1] ...
#> 	OK [copied cache in 3.9 milliseconds]
#> Installing rappdirs [0.3.3] ...
#> 	OK [copied cache in 3.9 milliseconds]
#> Installing sass [0.4.5] ...
#> 	OK [copied cache in 14 milliseconds]
#> Installing jquerylib [0.1.4] ...
#> 	OK [copied cache in 5.5 milliseconds]
#> Installing cachem [1.0.7] ...
#> 	OK [copied cache in 3.9 milliseconds]
#> Installing memoise [2.0.1] ...
#> 	OK [copied cache in 3.8 milliseconds]
#> Installing mime [0.12] ...
#> 	OK [copied cache in 3.9 milliseconds]
#> Installing bslib [0.4.2] ...
#> 	OK [copied cache in 35 milliseconds]
#> Installing evaluate [0.20] ...
#> 	OK [copied cache in 4.1 milliseconds]
#> Installing xfun [0.38] ...
#> 	OK [copied cache in 4.7 milliseconds]
#> Installing highr [0.10] ...
#> 	OK [copied cache in 4.1 milliseconds]
#> Installing yaml [2.3.7] ...
#> 	OK [copied cache in 4.7 milliseconds]
#> Installing knitr [1.42] ...
#> 	OK [copied cache in 12 milliseconds]
#> Installing cli [3.6.1] ...
#> 	OK [copied cache in 7.1 milliseconds]
#> Installing glue [1.6.2] ...
#> 	OK [copied cache in 4.6 milliseconds]
#> Installing lifecycle [1.0.3] ...
#> 	OK [copied cache in 4.7 milliseconds]
#> Installing magrittr [2.0.3] ...
#> 	OK [copied cache in 4.7 milliseconds]
#> Installing stringi [1.7.12] ...
#> 	OK [copied cache in 8.9 milliseconds]
#> Installing vctrs [0.6.1] ...
#> 	OK [copied cache in 7.9 milliseconds]
#> Installing stringr [1.5.0] ...
#> 	OK [copied cache in 5.2 milliseconds]
#> Installing tinytex [0.44] ...
#> 	OK [copied cache in 3.9 milliseconds]
#> Installing rmarkdown [2.20] ...
#> 	OK [copied cache in 20 milliseconds]
#> → Recording changes in lockfile
#> The following package(s) will be updated in the lockfile:
#> 
#> # CRAN ===============================
#> - R6          [* -> 2.5.1]
#> - base64enc   [* -> 0.1-3]
#> - bslib       [* -> 0.4.2]
#> - cachem      [* -> 1.0.7]
#> - cli         [* -> 3.6.1]
#> - digest      [* -> 0.6.31]
#> - ellipsis    [* -> 0.3.2]
#> - evaluate    [* -> 0.20]
#> - fastmap     [* -> 1.1.1]
#> - fs          [* -> 1.6.1]
#> - glue        [* -> 1.6.2]
#> - highr       [* -> 0.10]
#> - htmltools   [* -> 0.5.5]
#> - jquerylib   [* -> 0.1.4]
#> - jsonlite    [* -> 1.8.4]
#> - knitr       [* -> 1.42]
#> - lifecycle   [* -> 1.0.3]
#> - magrittr    [* -> 2.0.3]
#> - memoise     [* -> 2.0.1]
#> - mime        [* -> 0.12]
#> - rappdirs    [* -> 0.3.3]
#> - rlang       [* -> 1.1.0]
#> - rmarkdown   [* -> 2.20]
#> - sass        [* -> 0.4.5]
#> - stringr     [* -> 1.5.0]
#> - tinytex     [* -> 0.44]
#> - vctrs       [* -> 0.6.1]
#> - xfun        [* -> 0.38]
#> - yaml        [* -> 2.3.7]
#> 
#> # RSPM ===============================
#> - renv        [* -> 0.17.2]
#> 
#> # https://carpentries.r-universe.dev =
#> - stringi     [* -> 1.7.12]
#> 
#> The version of R recorded in the lockfile will be updated:
#> - R           [* -> 4.2.3]
#> 
#> * Lockfile written to '/tmp/RtmpR9qKLA/file16e11b675eb8/renv/profiles/lesson-requirements/renv.lock'.
#> Warning message:
#> The 'yaml' package is required to parse dependencies within R Markdown files
#> Consider installing it with `install.packages("yaml")`. 
#> 
#>  Lesson successfully created in /tmp/RtmpR9qKLA/file16e11b675eb8
#> → Creating Lesson in /tmp/RtmpR9qKLA/file16e11b675eb8...

#> /tmp/RtmpR9qKLA/file16e11b675eb8
build_lesson(tmp, preview = FALSE)
dir(file.path(tmp, "site"))
#> [1] "DESCRIPTION"   "README.md"     "_pkgdown.yaml" "built"        
#> [5] "docs"         
reset_site(tmp)
dir(file.path(tmp, "site"))
#> [1] "DESCRIPTION"   "README.md"     "_pkgdown.yaml" "built"