Render a Quarto multilingual project
Usage
render_book(project_path = ".", site_url = NULL, profile = NULL)
render_website(project_path = ".", site_url = NULL, profile = NULL)
Details
babelquarto expects a book/website folder with each qmd/Rmd present in as many languages as needed, with the same basename but,
once with only
.qmd
as extension for the main language,once with
.es.qmd
(using the language code) for each other language.
You also need to register the language in the configuration file,
see register_main_language()
and register_further_languages()
:
Examples
directory <- withr::local_tempdir()
quarto_multilingual_book(parent_dir = directory, project_dir = "blop")
#> Error in setwd(dir = new): cannot change working directory
render_book(file.path(directory, "blop"))
#> Warning: cannot open file '/tmp/RtmpQPpAnA/file176663d28444/blop/_quarto.yml': No such file or directory
#> Error in file(file, "rt", encoding = fileEncoding): cannot open the connection
if (FALSE) { # \dontrun{
if (require("servr") && rlang::is_interactive()) {
servr::httw(file.path(directory, "blop", "_book"))
}
} # }