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

Eliminate the search vignette #2574

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pkgdown (development version)

* `vignette("search")` has been removed since BS3 is deprecated and all the BS5 docs are also included in `build_search()` (#2564).
* YAML validation has been substantially improved so you should get much clearer errors if you have made a mistake (#1927). Please file an issue if you find a case where the error message is not helpful.
* `template_reference()` and `template_article()` now only add backticks to function names if needed (#2561).
* Custom navbars that specify `icon` but not `aria-label` will now generate a message reminding you to provide one for to improve accessibility (#2533).
Expand Down
13 changes: 10 additions & 3 deletions R/build-search-docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ url_node <- function(url) {
}

#' Build search index
#'
#' @description
#' Generate a JSON search index from the built site. This is used by
#' [fuse.js](https://www.fusejs.io/) to provide a javascript powered search for
#' BS5 powered pkgdown sites.
#'
#' Build a JSON file encompassing all HTML pages, for use by the search script.
#' NB: `build_search()` is called automatically by [build_site()]; you don't
#' need call it yourself. This page documents how it works and its customisation
#' options.
#'
#' # YAML config
#' You can exclude some paths from the search index.
#' Below we exclude the changelog from the search index.
#' You can exclude some paths from the search index using `search.exclude`.
#' Below we exclude the changelog from the search index:
#'
#' ```yaml
#' search:
Expand Down
5 changes: 0 additions & 5 deletions R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
#' footer which appear on every page. Learn more about these fields in
#' `vignette("customise")`.
#'
#' # Search
#'
#' The `search` field controls the built-in search and is
#' documented in `vignette("search")`.
#'
#' # Development mode
#' The `development` field allows you to generate different sites for the
#' development and released versions of your package. To use it, you first
Expand Down
12 changes: 9 additions & 3 deletions man/build_search.Rd

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

5 changes: 0 additions & 5 deletions man/build_site.Rd

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

4 changes: 3 additions & 1 deletion pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ articles:
- customise
- accessibility
- linking
- search
- metadata

- title: Advanced techniques
Expand Down Expand Up @@ -83,6 +82,9 @@ reference:
contents:
- starts_with("test", internal = TRUE)

redirects:
- ["articles/search.html", "reference/build_search.html"]

news:
releases:
- text: "Version 2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion vignettes/customise.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ It makes use of the the six built-in components:
- `articles`, if there are any vignettes or articles.
- `tutorials`, if there any tutorials.
- `news`, if `NEWS.md` exists.
- `search`, the search box (see `vignette("search")` for more details).
- `search`, the search box (see `?build_search` for more details).
- `github`, a link to the source repository (with an icon), if it can be automatically determined from the `DESCRIPTION`.

[^dots]: Note that dots (`.`) in the package name need to be replaced by hyphens (`-`) in the vignette filename to be recognized as the intro. That means for a
Expand Down
86 changes: 0 additions & 86 deletions vignettes/search.Rmd

This file was deleted.

Loading