Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Convert website to use {pkgdown} #902

Merged
merged 16 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@
^revdep$
^CRAN-SUBMISSION$
^_dev$
^vignettes/articles$
^pkgdown$
5 changes: 2 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ on:
name: Package checks

jobs:
## Website is not pkgdown; Run `source("tools/docs_update.R")` on release!
# website:
# uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
website:
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
routine:
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ revdep/checks.noindex
revdep/library.noindex
revdep/data.sqlite
viztest-*
inst/doc
docs
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@ Suggests:
purrr,
R6,
RJSONIO,
rmarkdown,
s2,
sf (>= 0.9-6),
shiny,
terra,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Config/Needs/website: dplyr, geojsonio, ncdf4, tidyverse/tidytemplate
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ S3method(polygonData,matrix)
S3method(polygonData,sf)
S3method(polygonData,sfc)
S3method(polygonData,sfg)
S3method(toPaletteFunc,"function")
S3method(toPaletteFunc,character)
S3method(toPaletteFunc,matrix)
S3method(to_multipolygon,Lines)
S3method(to_multipolygon,MULTILINESTRING)
S3method(to_multipolygon,MULTIPOLYGON)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* Fixed #893: Correctly call `terra::crs()` when checking the CRS of a `SpatVector` object in `pointData()` or `polygonData()` (thanks @mkoohafkan, #894).

* `{leaflet}` now has a brand new pkgdown site (@olivroy, #902)

# leaflet 2.2.1

* When `addProviderTiles()` is used with `{leaflet.providers}` version 2.0.0 or later, the `leaflet-providers` HTML dependency produced can be correctly cached by knitr. When used with older versions of `{leaflet.providers}`, the HTML dependency uses temp files that break knitr's caching mechanism (thanks @qdread, @jaredlander; #884).
Expand Down
3 changes: 3 additions & 0 deletions R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ brewer_pal <- function(palette, n = NULL) {

# Strings are interpreted as color names, unless length is 1 and it's the name
# of an RColorBrewer palette that is marked as qualitative
#' @export
toPaletteFunc.character <- function(pal, alpha, nlevels) {
if (length(pal) == 1 && pal %in% row.names(RColorBrewer::brewer.pal.info)) {
paletteInfo <- RColorBrewer::brewer.pal.info[pal, ]
Expand All @@ -341,11 +342,13 @@ toPaletteFunc.character <- function(pal, alpha, nlevels) {
}

# Accept colorRamp style matrix
#' @export
toPaletteFunc.matrix <- function(pal, alpha, nlevels) {
toPaletteFunc(rgb(pal, maxColorValue = 255), alpha = alpha)
}

# If a function, just assume it's already a function over [0-1]
#' @export
toPaletteFunc.function <- function(pal, alpha, nlevels) {
pal
}
Expand Down
1 change: 0 additions & 1 deletion R/leaflet-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ NULL
release_bullets <- function() {
c(
"Update static imports: `staticimports::import()`",
"Rebuild website: `source(\"scripts/docs_update.R\")`",
'Check Super Zip example: `shiny::runGitHub("rstudio/shiny-examples", subdir = "063-superzip-example")`',
"Check licenses if bundled dependencies were updated",
'`source("scripts/viztest.R")`'
Expand Down
3 changes: 0 additions & 3 deletions docs/.gitignore

This file was deleted.

Empty file removed docs/.nojekyll
Empty file.
19 changes: 0 additions & 19 deletions docs/Makefile

This file was deleted.

11 changes: 0 additions & 11 deletions docs/_includes/after_body.html

This file was deleted.

66 changes: 0 additions & 66 deletions docs/_includes/before_body.html

This file was deleted.

10 changes: 0 additions & 10 deletions docs/_output.yaml

This file was deleted.

Loading
Loading