Skip to content

Commit 7fd4a55

Browse files
authored
Rename use_tidy_pkgdown() to use_pkgdown_github_pages() (#1350)
1 parent 1ae30a1 commit 7fd4a55

File tree

7 files changed

+48
-65
lines changed

7 files changed

+48
-65
lines changed

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export(use_package_doc)
151151
export(use_partial_warnings)
152152
export(use_pipe)
153153
export(use_pkgdown)
154+
export(use_pkgdown_github_pages)
154155
export(use_pkgdown_travis)
155156
export(use_proprietary_license)
156157
export(use_r)
@@ -179,7 +180,6 @@ export(use_tidy_github)
179180
export(use_tidy_github_actions)
180181
export(use_tidy_issue_template)
181182
export(use_tidy_labels)
182-
export(use_tidy_pkgdown)
183183
export(use_tidy_release_test_env)
184184
export(use_tidy_style)
185185
export(use_tidy_support)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# usethis (development version)
22

3+
* `use_tidy_pkgdown()` has been renamed to `use_pkgdown_github_pages()` since
4+
the function is useful for anyone who wants to automatically publish to GitHub
5+
pages, not just the tidyverse team (#1308).
6+
37
* All functions that require a package now ask you if you'd like to install it.
48

59
`use_readme_rmd()`, `use_readme_md()`, `use_tidy_contributing()`, and `use_tidy_support()` use updated logic for determining the `OWNER/REPO` spec of the target repo (#1312).

R/github-pages.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#'
3636

3737
#' @seealso
38-
#' * [use_tidy_pkgdown()] combines `use_github_pages()` with other functions to
38+
#' * [use_pkgdown_github_pages()] combines `use_github_pages()` with other functions to
3939
#' fully configure a pkgdown site
4040
#' * <https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages>
4141
#' * <https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#pages>

R/pkgdown.R

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
#' Use pkgdown
22
#'
3+
#' @description
34
#' [pkgdown](https://pkgdown.r-lib.org) makes it easy to turn your package into
4-
#' a beautiful website. A couple functions help you begin to use pkgdown:
5-
#' * `use_pkgdown()`: creates a pkgdown config file, adds relevant files or
6-
#' directories to `.Rbuildignore` and `.gitignore`, and builds favicons if
7-
#' your package has a logo.
8-
#' * `use_github_action("pkgdown")` configures a GitHub Actions workflow to
9-
#' build and deploy your pkgdown site whenever you push changes to GitHub.
10-
#' Learn more about [use_github_action()]. This approach is actively
11-
#' maintained, because it is in use across many tidyverse, r-lib, and
12-
#' tidymodels packages.
13-
#' * `use_pkgdown_travis()` \lifecycle{soft-deprecated} helps you set up
14-
#' pkgdown for automatic deployment on Travis-CI. This is soft-deprecated,
15-
#' as the tidyverse team has shifted away from Travis-CI and towards GitHub
16-
#' Actions. `use_pkgdown_travis()` creates an empty `gh-pages` branch for
17-
#' the site and prompts about next steps regarding deployment keys and
18-
#' updating your `.travis.yml`. Requires that the current user can push to
19-
#' the primary repo, which must be configured as the `origin` remote.
5+
#' a beautiful website. usethis provides two functions help you use pkgdown:
6+
#'
7+
#' * `use_pkgdown()`: creates a pkgdown config file, adds relevant files or
8+
#' directories to `.Rbuildignore` and `.gitignore`, and builds favicons if
9+
#' your package has a logo.
10+
#'
11+
#' * `use_pkgdown_github_pages()`: implements the GitHub setup needed to
12+
#' automatically publish your pkgdown site to GitHub pages:
13+
#'
14+
#' - [use_github_pages()] prepares to publish the pkgdown site from the
15+
#' `github-pages` branch
16+
#' - [`use_github_action("pkgdown")`][use_github_action()] configures a
17+
#' GitHub Action to automatically build the pkgdown site and deploy it via
18+
#' GitHub Pages
19+
#' - The pkgdown site's URL is added to the pkgdown configuration file,
20+
#' to the URL field of DESCRIPTION, and to the GitHub repo.
21+
#'
22+
#' `use_pkgdown_travis()` is deprecated; we no longer recommend that you use
23+
#' Travis-CI.
2024
#'
2125
#' @seealso <https://pkgdown.r-lib.org/articles/pkgdown.html#configuration>
2226
#' @param config_file Path to the pkgdown yaml config file
@@ -49,21 +53,9 @@ use_pkgdown <- function(config_file = "_pkgdown.yml", destdir = "docs") {
4953

5054
# tidyverse pkgdown setup ------------------------------------------------------
5155

52-
#' @details
53-
#' * `use_tidy_pkgdown()`: Implements the pkgdown setup used for most tidyverse
54-
#' and r-lib packages:
55-
#' - [use_pkgdown()] does basic local setup
56-
#' - [use_github_pages()] prepares to publish the pkgdown site from the
57-
#' `github-pages` branch
58-
#' - [`use_github_action("pkgdown")`][use_github_action()] configures a
59-
#' GitHub Action to automatically build the pkgdown site and deploy it via
60-
#' GitHub Pages
61-
#' - The pkgdown site's URL is added to the pkgdown configuration file,
62-
#' to the URL field of DESCRIPTION, and to the GitHub repo.
63-
#'
64-
#' @rdname tidyverse
56+
#' @rdname use_pkgdown
6557
#' @export
66-
use_tidy_pkgdown <- function() {
58+
use_pkgdown_github_pages <- function() {
6759
tr <- target_repo(github_get = TRUE)
6860

6961
use_pkgdown()

man/tidyverse.Rd

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/use_github_pages.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/use_pkgdown.Rd

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

0 commit comments

Comments
 (0)