Skip to content

Commit 3c22e79

Browse files
committed
docs: add missing rd stuff
1 parent 7625e2a commit 3c22e79

12 files changed

+115
-2
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
^\.github$
55
^LICENSE\.md$
66
^\.lintr$
7-
^man/read_yaml\.Rd$
87
.ropensci-staff
98
^codemeta\.json$
9+
^man/filter_freeze_directory\.Rd$
10+
^man/read_yaml\.Rd$

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Description: Automate rendering and cross-linking of Quarto books following a
1717
License: MIT + file LICENSE
1818
Encoding: UTF-8
1919
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace", "devtag::dev_roclet"))
20-
RoxygenNote: 7.3.2
20+
RoxygenNote: 7.3.2.9000
2121
Imports:
2222
brio,
2323
cli,

R/helper-quarto.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
#' @param placement Where to place the language links (sidebar, navbar).
1111
#'
1212
#' @return The path to the created project.
13+
#' @examplesIf interactive()
14+
#' parent_dir <- withr::local_tempdir()
15+
#' quarto_multilingual_book(
16+
#' parent_dir = parent_dir,
17+
#' project_dir = "blop",
18+
#' further_languages = c("es", "fr"),
19+
#' main_language = "en"
20+
#' )
21+
#'
1322
#' @export
1423
#'
1524
quarto_multilingual_book <- function(

R/register.R

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
#' @param main_language Main language code (character, like `"en"`)
44
#' @inheritParams render_book
55
#' @return Nothing
6+
#' @examplesIf interactive()
7+
#' parent_dir <- withr::local_tempdir()
8+
#' quarto_multilingual_book(
9+
#' parent_dir = parent_dir,
10+
#' project_dir = "blop",
11+
#' further_languages = c("es", "fr"),
12+
#' main_language = "en",
13+
#' register_languages = FALSE
14+
#' )
15+
#' book_path <- file.path(parent_dir, "blop")
16+
#' register_main_language("en", book_path)
17+
#' # have a look at the config
18+
#' file.edit(file.path(parent_dir, "blop", "_quarto.yml"))
619
#' @export
720
register_main_language <- function(main_language = "en", project_path = ".") {
821
config_path <- file.path(project_path, "_quarto.yml")
@@ -50,6 +63,17 @@ register_main_language <- function(main_language = "en", project_path = ".") {
5063
#' @inheritParams render_book
5164
#'
5265
#' @return Nothing
66+
#' @examplesIf interactive()
67+
#' parent_dir <- withr::local_tempdir()
68+
#' quarto_multilingual_book(
69+
#' parent_dir = parent_dir,
70+
#' project_dir = "blop",
71+
#' further_languages = c("es", "fr"),
72+
#' main_language = "en"
73+
#' )
74+
#' register_further_languages("pt", project_path = file.path(parent_dir, "blop"))
75+
#' # have a look at the configuration
76+
#' file.edit(file.path(parent_dir, "blop", "_quarto.yml"))
5377
#' @export
5478
#'
5579
register_further_languages <- function(further_languages, project_path = ".") {

R/render.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#' @param site_url Base URL of the book/website.
2525
#' @param profile Quarto profile(s) to use.
2626
#'
27+
#' @return Nothing, called for its side-effect of rendering a project.
2728
#' @export
2829
#'
2930
#' @examples

R/utils-yaml.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#' Alias for yaml::read_yaml with a custom handler
22
#'
33
#' @param path Path to yaml file
4+
#' @return A list
5+
#' @examples \dontrun{
6+
#' read_yaml(path)
7+
#' }
48
#' @dev
59
read_yaml <- function(path) {
610
yaml::read_yaml(path, handlers = list(seq = function(x) x))

man/filter_freeze_directory.Rd

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/quarto_multilingual_book.Rd

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/read_yaml.Rd

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/register_further_languages.Rd

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)