Showing metadata in the Pagefind Default UI

This page documents the "Default UI", which is still supported but no longer the primary recommendation. The Component UI is now the main way to add search to your site.

Pagefind’s Default UI uses the default metadata keys to customize the way results are displayed. The following metadata items are used in the Default UI:

  • The title of each search result uses the title key from the page metadata
  • The image beside each search result uses the image and image_alt keys from the page metadata
  • The url of each search result may be overridden by specifying a url key in the page metadata

Any other metadata key-value pairs you assign to pages will be shown below the search result.