|
1 | 1 | #' Use pkgdown |
2 | 2 | #' |
| 3 | +#' @description |
3 | 4 | #' [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. |
20 | 24 | #' |
21 | 25 | #' @seealso <https://pkgdown.r-lib.org/articles/pkgdown.html#configuration> |
22 | 26 | #' @param config_file Path to the pkgdown yaml config file |
@@ -49,21 +53,9 @@ use_pkgdown <- function(config_file = "_pkgdown.yml", destdir = "docs") { |
49 | 53 |
|
50 | 54 | # tidyverse pkgdown setup ------------------------------------------------------ |
51 | 55 |
|
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 |
65 | 57 | #' @export |
66 | | -use_tidy_pkgdown <- function() { |
| 58 | +use_pkgdown_github_pages <- function() { |
67 | 59 | tr <- target_repo(github_get = TRUE) |
68 | 60 |
|
69 | 61 | use_pkgdown() |
|
0 commit comments