| Crates.io | auto-pagefind |
| lib.rs | auto-pagefind |
| version | 0.1.5 |
| created_at | 2023-07-02 20:39:55.983134+00 |
| updated_at | 2023-08-11 10:21:20.851176+00 |
| description | Pagefind for servers. Great for next.js non output export applications. Fully crawl and index your app in one command. |
| homepage | |
| repository | https://github.com/a11ywatch/auto-pagefind |
| max_upload_size | |
| id | 906397 |
| size | 153,298 |
Use Pagefind with any live server.
Install the modules required for the program.
cargo install spider_clicargo install pagefindcargo install auto-pagefindStart 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.
Optional: Add data-pagefind-meta="url[href]" on your meta hrefLang links example: <link rel="alternate" hrefLang="en" href="https://a11ywatch.com/blog/version-your-proto-definitions-for-stablity" data-pagefind-meta="url[href]"/> to replace the location of the links.
Setup pagefind client loading in the your project. You can use the pagefind-react component with npm install pagefind-react --save for a drop in ready search.

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 <DOWNLOAD_DIR> The download directory for storing the static.html files
-u, --url <URL> The website url
-h, --help Print help
-V, --version Print version
You need to add the following header if csp is enabled 'wasm-unsafe-eval'.