-
-
Notifications
You must be signed in to change notification settings - Fork 896
Pagefind CLI → Pagefind API #3534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2b95224 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
|
Hello, thanks a lot for the PR, is there a chance this goes into the next version? 😄 |
Yes, planned for v0.38! |
|
Nice, thanks a lot! |
delucis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @HiDeoo! Left a few small comments, but this looks great!
delucis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, and I missed the failing coverage check. Looks like we should add some testing maybe? The new integrations/pagefind.ts file is showing many lines uncovered in tests.
Co-authored-by: delucis <[email protected]>

Description
This PR refactors how Pagefind is run after the build process. Instead of using the CLI via
npx, it now uses the Pagefind API directly.Feature-wise, there should be no changes but one aspect which will differ is logging.
We are now directly using a fork of the Starlight ingration logger. I didn't spend too much time on tweaking the logging output so far, but one huge difference is that we don't have access to the same informations when using the API vs CLI which access them using some internal Rust code and that data is not exposed via the API.
Personally, I never found the logging output of the CLI very useful, so I think this is an overall improvement but definitely something worth mentioning and discussing if needed.
Todo