CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.66k stars 120 forks source link

Documented bundlePath override does not work #520

Open Snugug opened 1 year ago

Snugug commented 1 year ago

The documentation for overriding the Pagefind bundle's path is to configure the bundlePath option. Unfortunately, that option doesn't exist in the currently output pagefind file when writing the bundle from the Node.js getFiles call. Instead, you need to use basePath (as seen in the Index Options below) to override it. I'm not sure where the bug is here, whether it's documentation, source code, or specifically the output from getFiles, otherwise I would have filed a PR.

https://github.com/CloudCannon/pagefind/blob/4a9927764e00fdd4db3a30546de43e1421a6be9e/pagefind_web_js/types/index.d.ts#L7

LMK if you need more information to help track this down!

bglw commented 12 months ago

Good catch! Sorry to delay — this does indeed look like it just got named wrong in a kerfuffle. I'll fix this up for the next patch release 🙂