https://github.com/a11ywatch/auto-pagefind
Pagefind for non static exports
https://github.com/a11ywatch/auto-pagefind
nextjs pagefind
Last synced: 2 months ago
JSON representation
Pagefind for non static exports
- Host: GitHub
- URL: https://github.com/a11ywatch/auto-pagefind
- Owner: a11ywatch
- License: mit
- Created: 2023-07-02T15:36:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T10:21:12.000Z (over 1 year ago)
- Last Synced: 2025-02-01T15:47:55.485Z (3 months ago)
- Topics: nextjs, pagefind
- Language: Rust
- Homepage: https://a11ywatch.com/blog
- Size: 227 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto-pagefind
Use [Pagefind](https://pagefind.app/) with any live server.
## Insallation
Install the modules required for the program.
1. `cargo install spider_cli`
1. `cargo install pagefind`
1. `cargo install auto-pagefind`## Getting Started
1. Start the dev or prod instance on port 3000 and run `auto-pagefind` at the root directory of your next application to create your search index's and output the content into the `public` folder.
2. Optional: Add `data-pagefind-meta="url[href]"` on your meta `hrefLang` links example: `` to replace the location of the links.
3. Setup pagefind client loading in the your project. You can use the [pagefind-react](./react) component with `npm install pagefind-react --save` for a drop in ready search.

## Options
Some optional options below.
```
auto-pagefind --help
Pagefind for next.js non output export applications. Fully crawl and index your app in one command.Usage: auto-pagefind [OPTIONS]
Options:
-d, --download-dir The download directory for storing the static.html files
-u, --url The website url
-h, --help Print help
-V, --version Print version
```## CSP
You need to add the following header if csp is enabled `'wasm-unsafe-eval'`.