pagefind

Implement search on any static website.

MIT 120 个版本
安装
npm install pagefind
yarn add pagefind
pnpm add pagefind
bun add pagefind
README

Pagefind Static Search

Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure.

The full documentation on using Pagefind can be found at https://pagefind.app/.

This packages houses a wrapper for running the precompiled Pagefind binary, and also serves as a NodeJS indexing library that can be integrated into existing tools.

Running Pagefind through NPX

This is the recommended way of running Pagefind on a static site.

npx pagefind --site "public"

For more details on using the Pagefind binary, see Installing and running Pagefind, and the rest of the Pagefind documentation.

Using Pagefind as a Node library

This package also provides an interface to the Pagefind binary directly as a package you can import.

import * as pagefind from "pagefind";

// Create a Pagefind search index to work with
const { index } = await pagefind.createIndex();

// Index all HTML files in a directory
await index.addDirectory({
    path: "public"
});

// Add extra content
await index.addCustomRecord({
    url: "/resume.pdf",
    content: "Aenean lacinia bibendum nulla sed consectetur",
    language: "en",
});

// Get the index files in-memory
const { files } = await index.getFiles();

// Or, write the index to disk
await index.writeFiles({
    outputPath: "public/pagefind"
});

For more details on using Pagefind as a library, see Indexing content using the NodeJS API.

版本列表
1.5.2 2026-04-12
1.5.0-beta.2 2026-04-03
1.5.0-beta.1 2026-01-11
1.5.0-alpha.4 2026-01-11
1.5.0-alpha.3 2025-12-26
1.5.0-alpha.2 2025-10-17
1.5.0-alpha.1 2025-10-17
1.5.0 2026-04-06
1.4.0-rc.3 2025-09-01
1.4.0-rc.2 2025-09-01
1.4.0-rc.1 2025-09-01
1.4.0-alpha.1 2025-01-27
1.4.0-alpha.0 2025-01-19
1.4.0 2025-09-01
1.3.0 2024-12-18
1.2.0 2024-11-06
1.1.1-alpha.4 2024-08-17
1.1.1-alpha.3 2024-07-18
1.1.1-alpha.2 2024-07-16
1.1.1-alpha.1 2024-05-08
1.1.1 2024-09-03
1.1.0 2024-04-02
1.1.0-rc1 2024-03-29
1.0.5-rc2 2024-02-01
1.0.5-rc1 2023-11-29
1.0.5-rc0 2023-11-28
1.0.4-beta.0 2023-10-03
1.0.4 2023-11-16
1.0.4-rc2 2023-11-16
1.0.4-rc1 2023-11-15
1.0.4-rc0 2023-10-02
1.0.3 2023-09-16
1.0.3-rc1 2023-09-16
1.0.3-rc0 2023-09-16
1.0.2 2023-09-14
1.0.1 2023-09-14
1.0.1-rc1 2023-09-13
1.0.1-rc0 2023-09-13
1.0.0-beta.6 2023-09-13
1.0.0-beta.5 2023-09-12
1.0.0-beta.4 2023-09-12
1.0.0-beta.3 2023-09-08
1.0.0-beta.2 2023-09-07
1.0.0-beta.1 2023-09-06
1.0.0-beta.0 2023-09-05
1.0.0-alpha.10 2023-08-08
1.0.0-alpha.9 2023-07-28
1.0.0-alpha.8 2023-07-08
1.0.0-alpha.7 2023-07-07
1.0.0-alpha.6 2023-07-06
1.0.0-alpha.5 2023-05-26
1.0.0-alpha.4 2023-04-13
1.0.0-alpha.3 2023-04-13
1.0.0-alpha.2 2023-04-03
1.0.0-alpha.1 2023-04-03
1.0.0-alpha.0 2023-04-02
1.0.0 2023-09-13
0.13.0-alpha.0 2023-03-07
0.12.1-beta.0 2023-03-06
0.12.0-beta.3 2023-03-01
0.12.0-beta.2 2023-02-28
0.12.0-beta.1 2023-02-28
0.12.0-beta.0 2023-02-28
0.12.0 2023-03-01
0.11.1-beta.3 2023-02-24
0.11.1-beta.2 2023-02-24
0.11.0 2023-02-16
0.10.7 2023-01-19
0.10.6 2022-12-18
0.10.5 2022-12-14
0.10.4 2022-12-06
0.10.3 2022-12-02
0.10.2 2022-11-24
0.10.1 2022-11-23
0.10.0 2022-11-15
0.9.3 2022-11-07
0.9.2 2022-11-06
0.9.1 2022-10-26
0.9.0 2022-10-26
0.8.1 2022-09-12
0.8.0 2022-08-23
0.7.1 2022-08-13
0.7.0 2022-08-12
0.6.1 2022-08-05
0.6.0 2022-08-05
0.5.3 2022-07-29
0.5.2 2022-07-29
0.5.1 2022-07-28
0.5.0 2022-07-26
0.4.1 2022-07-07
0.4.0 2022-07-06
0.3.2 2022-07-04
0.3.1 2022-07-04
0.3.0 2022-07-02
0.2.0 2022-07-01
0.1.1-rc42 2022-06-30
0.1.1-rc41 2022-06-30
0.1.1-rc38 2022-06-29
0.1.1-rc36 2022-06-29
0.1.1-rc35 2022-06-28
0.1.1-rc33 2022-06-22
0.1.1-rc32 2022-06-21
0.1.1-rc31 2022-06-21
0.1.1-rc30 2022-06-21
0.1.1-rc29 2022-06-20
0.1.1-rc28 2022-06-08
0.1.1-rc26 2022-06-08
0.1.1-rc24 2022-05-27
0.1.1-rc23 2022-05-27
0.1.1-rc22 2022-05-26
0.1.1-rc21 2022-05-25
0.1.1-rc20 2022-05-24
0.1.1-rc19 2022-05-23
0.1.1-rc18 2022-05-21
0.1.1-rc16 2022-05-21
0.1.1-rc15 2022-05-20
0.1.1-rc14 2022-05-05
0.1.0 2022-04-27
0.1.0-rc10 2022-05-04
0.1.0-rc0 2022-05-04