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, open = FALSE, rmd = FALSE)
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...
#>  No schedule set, using Rmd files in episodes/ directory.
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...

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

#> ────────────────────────────────────────────────────────────────────────
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...

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

#>  First episode created in /tmp/RtmpUWqX2P/file18804b44efa6/episodes/introduction.md
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...

#>  Workflows up-to-date!
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...

#>  Lesson successfully created in /tmp/RtmpUWqX2P/file18804b44efa6
#> → Creating Lesson in /tmp/RtmpUWqX2P/file18804b44efa6...

#> /tmp/RtmpUWqX2P/file18804b44efa6
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"