Skip to content

Commit

Permalink
Merge branch 'main' into dark-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jayhesselberth authored Nov 28, 2023
2 parents 4e1278b + 5a0a31f commit e6a3dba
Show file tree
Hide file tree
Showing 38 changed files with 494 additions and 265 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
tags: ['*']
pull_request:
branches: [master, main]
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
isPush: ${{ github.event_name == 'push' }}

isPush: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-tinytex@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Package: pkgdown
Title: Make Static HTML Documentation for a Package
Version: 2.0.7.9000
Authors@R: c(
person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre"),
person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-4757-117X")),
person("Jay", "Hesselberth", role = "aut",
comment = c(ORCID = "0000-0002-6299-179X")),
person("Maëlle", "Salmon", role = "aut",
comment = c(ORCID = "0000-0002-2815-0399")),
person("RStudio", role = c("cph", "fnd"))
person("Posit Software, PBC", role = c("cph", "fnd"))
)
Description: Generate an attractive and useful website from a source
package. 'pkgdown' converts your documentation, vignettes, 'README',
Expand All @@ -18,7 +18,7 @@ License: MIT + file LICENSE
URL: https://pkgdown.r-lib.org, https://github.com/r-lib/pkgdown
BugReports: https://github.com/r-lib/pkgdown/issues
Depends:
R (>= 3.1.0)
R (>= 3.6)
Imports:
bslib (>= 0.3.1),
callr (>= 3.7.3),
Expand All @@ -44,6 +44,7 @@ Suggests:
covr,
diffviewer,
evaluate,
gert,
htmltools,
htmlwidgets,
knitr,
Expand All @@ -66,5 +67,5 @@ Remotes:
rstudio/bslib
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.2.9000
RoxygenNote: 7.2.3
SystemRequirements: pandoc
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2014--2018
COPYRIGHT HOLDER: RStudio
YEAR: 2023
COPYRIGHT HOLDER: pkgdown authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2014-2018 RStudio
Copyright (c) 2023 pkgdown authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# pkgdown (development version)

* Preserve Markdown code blocks with class rmd from roxygen2 docs (@salim-b, #2298).
* Avoid unwanted linebreaks from parsing `DESCRIPTION` (@salim-b, #2247).
* Remove redundant entries in the documentation index when multiple explicit `@usage` tags are provided (@klmr, #2302)
* The article index now sorts vignettes and non-vignette articles alphabetically by their filename (literally, their `basename()`), by default (@jennybc, #2253).
* Add Catalan translation (@jmaspons, #2333)
* Set RNG seed for htmlwidgets IDs. This reduces noise in pkgdown reference HTML output when examples generate htmlwidgets (@salim-b, #2294).

# pkgdown 2.0.7

Expand Down
2 changes: 1 addition & 1 deletion R/build-github.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#'
#' It is designed to be run in CI, so by default it:
#'
#' * Clean out the old site.
#' * Cleans out the old site.
#' * Does not install the package.
#' * Runs [build_site()] in process.
#'
Expand Down
7 changes: 5 additions & 2 deletions R/build-reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
#' rapidly prototype. It is set to `FALSE` by [build_site()].
#' @param run_dont_run Run examples that are surrounded in \\dontrun?
#' @param examples Run examples?
#' @param seed Seed used to initialize so that random examples are
#' reproducible.
#' @param seed Seed used to initialize random number generation so that
#' examples are reproducible.
#' @param devel Determines how code is loaded in order to run examples.
#' If `TRUE` (the default), assumes you are in a live development
#' environment, and loads source package with [pkgload::load_all()].
Expand Down Expand Up @@ -223,6 +223,9 @@ examples_env <- function(pkg, seed = 1014, devel = TRUE, envir = parent.frame())
width <- purrr::pluck(pkg, "meta", "code", "width", .default = 80)
withr::local_options(width = width, .local_envir = envir)
withr::local_seed(seed)
if (requireNamespace("htmlwidgets", quietly = TRUE)) {
htmlwidgets::setWidgetIdSeed(seed)
}

examples_env <- child_env(globalenv())
if (file_exists(pre_path)) {
Expand Down
18 changes: 7 additions & 11 deletions R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,16 @@
#' to danger). Finally, you can choose to override the default tooltip with
#' `version_tooltip`.
#'
#' @section Navigation bar:
#' ```{r child="man/rmd-fragments/navbar-configuration.Rmd"}
#' ```
#'
#' You can also customise the colour scheme of the navbar by using the `type`
#' and `bg` parameters. See `vignette("customise")` for more details.
#' ## Page layout
#'
#' @section Footer:
#' ```{r child="man/rmd-fragments/footer-configuration.Rmd"}
#' ```
#' The `navbar`, `footer`, and `sidebar` fields control the appearance
#' of the navbar, footer, and sidebar respectively. They have many individual
#' options which are documented in the **Layout** section of
#' `vignette("customise")`.
#'
#' @section Search:
#' The `search` field controls the built-in search. See `vignette("search")`
#' for details.
#' The `search` field controls the built-in search and is
#' documented in `vignette("search")`.
#'
#' @section Template:
#' The `template` field is mostly used to control the appearance of the site.
Expand Down
2 changes: 2 additions & 0 deletions R/tweak-reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ tweak_highlight_other <- function(div) {
lang <- sub("sourceCode ", "", xml2::xml_attr(div, "class"))
# since roxygen 7.2.0 generic code blocks have sourceCode with no lang
if (!is.na(lang) && lang == "sourceCode") lang <- "r"
# Pandoc does not recognize rmd as a language :-)
if (tolower(lang) %in% c("rmd", "qmd")) lang <- "markdown"
# many backticks to account for possible nested code blocks
# like a Markdown code block with code chunks inside
md <- paste0("``````", lang, "\n", xml2::xml_text(code), "\n``````")
Expand Down
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ install.packages("pkgdown")
::: .pkgdown-devel
```{r, eval = FALSE}
# Install development version from GitHub
devtools::install_github("r-lib/pkgdown")
# install.packages("pak")
pak::pak("r-lib/pkgdown")
```
:::

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ install.packages("pkgdown")

``` r
# Install development version from GitHub
devtools::install_github("r-lib/pkgdown")
# install.packages("pak")
pak::pak("r-lib/pkgdown")
```

</div>
Expand Down Expand Up @@ -81,7 +82,7 @@ Then learn about the many new ways to customise your site in

## In the wild

At last count, pkgdown is used [by over 6,000
At last count, pkgdown is used [by over 8,000
packages](https://github.com/search?q=path%3A_pkgdown.yml+language%3AYAML&type=code&l=YAML).
Here are a few examples created by contributors to pkgdown:

Expand Down
Binary file added inst/po/ca/LC_MESSAGES/R-pkgdown.mo
Binary file not shown.
4 changes: 3 additions & 1 deletion man/build_home.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/build_reference.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

136 changes: 9 additions & 127 deletions man/build_site.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e6a3dba

Please sign in to comment.