Render a Quarto multilingual project
Usage
render_book(project_path = ".", site_url = NULL)
render_website(project_path = ".", site_url = 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")
#> [1] "/tmp/RtmpGX3k6I/file3df348e6e84/blop"
render_book(file.path(directory, "blop"))
#>
[1/4] index.qmd
#>
[2/4] intro.qmd
#>
[3/4] summary.qmd
#>
[4/4] references.qmd
#>
#> Output created: _book/index.html
#>
#>
[1/4] index.es.qmd
#>
[2/4] intro.es.qmd
#>
[3/4] summary.es.qmd
#>
[4/4] references.es.qmd
#>
#> Output created: _book/index.es.html
#>
#>
[1/4] index.fr.qmd
#>
[2/4] intro.fr.qmd
#>
[3/4] summary.fr.qmd
#>
[4/4] references.fr.qmd
#>
#> Output created: _book/index.fr.html
#>
#>
if (FALSE) { # \dontrun{
if (require("servr") && rlang::is_interactive()) {
servr::httw(file.path(directory, "blop", "_book"))
}
} # }