I created a vite adapter for pagefind! #550
Replies: 7 comments 2 replies
-
|
I tried it on my SvelteKit project. The search UI does show up and I can type in it. Only problem is that the url it navigates user to is wrong (404). What I expect: my config const pagefindConfig = {
publicDir: 'static',
buildDir: 'build'
}; |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the feedback, I haven't used it with the UI, I will try and do the same as you did, there are still a few bugs with the plugin so I suggest you wait before using it, sorry for the inconvenience! |
Beta Was this translation helpful? Give feedback.
-
|
@wentallout I just tested pagefind locally and it all works correctly: .replace('.html', '');What version of the plugin are you running? I just pushed a update that fixed a pathing issue, I suspect you were victim of it, also, if you have any further questions please open up an issue on the vite-plugin-pagefind repo as this isn't so much related to pagefind anymore. |
Beta Was this translation helpful? Give feedback.
-
|
Awesome @Hugos68 ! ❤️ I'll move this to a discussion so we can keep it alive, and I'll get this onto the website's resources page 🔜 ! |
Beta Was this translation helpful? Give feedback.
-
|
Awesome work, tried it and working perfectly. One question though, for pagefind to work with a static build site, I have to |
Beta Was this translation helpful? Give feedback.
-
|
FYI I've written an article about the issue and the solution: https://portfolio-2-70z.pages.dev/blog/pagefind-with-vite/ |
Beta Was this translation helpful? Give feedback.
-
|
FYI I've now update the Vite Plugin with a major overhaul allowing much more flexible configurations. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, I created a vite plugin for pagefind: https://github.com/Hugos68/vite-plugin-pagefind
This will help people that are using: Svelte, Vue, Qwik, Solid or any other Vite based project.
Wanted to share it but this honestly should probably be a package pagefind provides in the future, it does really make your life a lot easier.
This also solves #327 and partially solves #539.
Beta Was this translation helpful? Give feedback.
All reactions