"

Skip to contents

Generate a JSON search index from the built site. This is used by fuse.js to provide a javascript powered search for BS5 powered pkgdown sites.

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.

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 using search.exclude. Below we exclude the changelog from the search index:

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

Debugging

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.