From 8f3a2863d16bb8efd325c8b94f307931164a7a89 Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 4 Jun 2024 13:07:44 -0400 Subject: [PATCH] Fix typos + add cross-references --- R/build-articles.R | 3 +-- R/build-favicons.R | 10 +++++----- R/build-reference.R | 2 +- man/build_articles.Rd | 3 +-- man/build_favicons.Rd | 10 +++++----- man/build_reference.Rd | 2 +- pkgdown/_pkgdown.yml | 8 ++++---- vignettes/translations.Rmd | 2 +- 8 files changed, 19 insertions(+), 21 deletions(-) diff --git a/R/build-articles.R b/R/build-articles.R index 68bc53571..38411d683 100644 --- a/R/build-articles.R +++ b/R/build-articles.R @@ -174,8 +174,7 @@ #' #' # Suppressing vignettes #' If you want [articles](https://r-pkgs.org/vignettes.html#sec-vignettes-article) -#' that are not vignettes, use `usethis::use_article()` either put them in -#' subdirectories or list in `.Rbuildignore`. An articles link will be +#' that are not vignettes, use `usethis::use_article()` to create it. An articles link will be #' automatically added to the default navbar if the vignettes directory is #' present: if you do not want this, you will need to customise the navbar. See #' [build_site()] details. diff --git a/R/build-favicons.R b/R/build-favicons.R index 252f7fa61..3b0c02c2c 100644 --- a/R/build-favicons.R +++ b/R/build-favicons.R @@ -1,16 +1,16 @@ -#' Create favicons from package logo +#' Initialise favicons from package logo #' #' This function auto-detects the location of your package logo (with the name -#' `logo.svg` (recommended format) or `logo.png`) and runs it through the -#' API to build a complete set of favicons -#' with different sizes, as needed for modern web usage. +#' `logo.svg` (recommended format) or `logo.png`, created with `usethis::use_logo()`) +#' and runs it through the API to build a +#' complete set of favicons with different sizes, as needed for modern web usage. #' #' You only need to run the function once. The favicon set will be stored in #' `pkgdown/favicon` and copied by [init_site()] to the relevant location when #' the website is rebuilt. #' #' Once complete, you should add `pkgdown/` to `.Rbuildignore ` to avoid a NOTE -#' during package checking. +#' during package checking. (`usethis::use_logo()` does this for you!) #' #' @inheritParams as_pkgdown #' @param overwrite If `TRUE`, re-create favicons from package logo. diff --git a/R/build-reference.R b/R/build-reference.R index e7529d5ed..16ad706af 100644 --- a/R/build-reference.R +++ b/R/build-reference.R @@ -83,7 +83,7 @@ #' * `has_lifecycle("deprecated")` will select all topics with lifecycle #' deprecated. #' -#' All functions (except for `has_keywords()`) automatically exclude internal +#' All functions (except for `has_keyword()`) automatically exclude internal #' topics (i.e. those with `\keyword{internal}`). You can choose to include #' with (e.g.) `starts_with("build_", internal = TRUE)`. #' diff --git a/man/build_articles.Rd b/man/build_articles.Rd index 974cfe245..e1d92d88e 100644 --- a/man/build_articles.Rd +++ b/man/build_articles.Rd @@ -228,8 +228,7 @@ Additionally, htmlwidgets do not work when \code{as_is: true}. \section{Suppressing vignettes}{ If you want \href{https://r-pkgs.org/vignettes.html#sec-vignettes-article}{articles} -that are not vignettes, use \code{usethis::use_article()} either put them in -subdirectories or list in \code{.Rbuildignore}. An articles link will be +that are not vignettes, use \code{usethis::use_article()} to create it. An articles link will be automatically added to the default navbar if the vignettes directory is present: if you do not want this, you will need to customise the navbar. See \code{\link[=build_site]{build_site()}} details. diff --git a/man/build_favicons.Rd b/man/build_favicons.Rd index 245393ebf..2b76a279b 100644 --- a/man/build_favicons.Rd +++ b/man/build_favicons.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/build-favicons.R \name{build_favicons} \alias{build_favicons} -\title{Create favicons from package logo} +\title{Initialise favicons from package logo} \usage{ build_favicons(pkg = ".", overwrite = FALSE) } @@ -13,9 +13,9 @@ build_favicons(pkg = ".", overwrite = FALSE) } \description{ This function auto-detects the location of your package logo (with the name -\code{logo.svg} (recommended format) or \code{logo.png}) and runs it through the -\url{https://realfavicongenerator.net} API to build a complete set of favicons -with different sizes, as needed for modern web usage. +\code{logo.svg} (recommended format) or \code{logo.png}, created with \code{usethis::use_logo()}) +and runs it through the \url{https://realfavicongenerator.net} API to build a +complete set of favicons with different sizes, as needed for modern web usage. } \details{ You only need to run the function once. The favicon set will be stored in @@ -23,5 +23,5 @@ You only need to run the function once. The favicon set will be stored in the website is rebuilt. Once complete, you should add \verb{pkgdown/} to \code{.Rbuildignore } to avoid a NOTE -during package checking. +during package checking. (\code{usethis::use_logo()} does this for you!) } diff --git a/man/build_reference.Rd b/man/build_reference.Rd index 9067052cf..93742339b 100644 --- a/man/build_reference.Rd +++ b/man/build_reference.Rd @@ -133,7 +133,7 @@ or \code{sass::font_face} (topic name). deprecated. } -All functions (except for \code{has_keywords()}) automatically exclude internal +All functions (except for \code{has_keyword()}) automatically exclude internal topics (i.e. those with \verb{\\keyword\{internal\}}). You can choose to include with (e.g.) \code{starts_with("build_", internal = TRUE)}. diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index d48d56265..4fd887896 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -63,10 +63,9 @@ reference: desc: These functions are useful for rapid iteration when you're working on a specific part of your site. contents: - - starts_with("build_") - - -build_site - - -build_site_github_pages - - -build_favicons + - has_concept("site components") + - build_search + - build_redirects - init_site - subtitle: Customisation @@ -98,6 +97,7 @@ reference: redirects: - ["articles/search.html", "reference/build_search.html"] +- ["articles/pkgdown.html#language", "articles/translations.html"] news: releases: diff --git a/vignettes/translations.Rmd b/vignettes/translations.Rmd index eccb08e04..394825b3f 100644 --- a/vignettes/translations.Rmd +++ b/vignettes/translations.Rmd @@ -92,5 +92,5 @@ Then commit your changes to Git and submit your pull request for review: ```{r} #| eval: false -usethis::pr_submit() +usethis::pr_push() ```