build_search: Build search index

View source: R/build-search-docs.R

build_searchR Documentation

Build search index

Description

Build a JSON file encompassing all HTML pages, for use by the search script.

Usage

build_search(pkg = ".", override = list())

Arguments

pkg

Path to package.

override

An optional named list used to temporarily override values in _pkgdown.yml

YAML config

You can exclude some paths from the search index. Below we exclude the changelog from the search index.

search:
  exclude: ['news/index.html']

Debugging and local testing

Locally (as opposed to on GitHub Pages or Netlify for instance), search won't work if you simply use pkgdown preview of the static files. You can use servr::httw("docs") instead.

If search is not working, run pkgdown::pkgdown_sitrep() to eliminate common issues such as the absence of URL in the pkgdown configuration file of your package.


pkgdown documentation built on Dec. 28, 2022, 1:37 a.m.