Skip to content
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

Add a pagefind boolean flag to user config #1144

Merged
merged 9 commits into from
Nov 29, 2023
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Nov 24, 2023

Description

  • Closes Enable to opt out of pagefind #952
  • Adds a pagefind boolean to user config that can be set to false to disable Pagefind indexing and skip rendering the default search UI.

Copy link

changeset-bot bot commented Nov 24, 2023

🦋 Changeset detected

Latest commit: f137590

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

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

Copy link

vercel bot commented Nov 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Nov 29, 2023 7:30pm

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Nov 24, 2023
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Nov 24, 2023

size-limit report 📦

Path Size
/index.html 5.12 KB (0%)
/_astro/*.js 20.11 KB (0%)
/_astro/*.css 13 KB (0%)

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs review! Some comments suggested.

.changeset/beige-shoes-whisper.md Outdated Show resolved Hide resolved
docs/src/content/docs/reference/configuration.mdx Outdated Show resolved Hide resolved
packages/starlight/utils/user-config.ts Outdated Show resolved Hide resolved
Co-authored-by: Sarah Rainsberger <[email protected]>
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect and ready to me 👍

@delucis delucis added the 🌟 minor Change that triggers a minor release label Nov 24, 2023
Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@kevinzunigacuellar
Copy link
Member

kevinzunigacuellar commented Nov 25, 2023

I'm considering an API structure like this:

search: 'pagefind' // or false

I find this setup more explicit in its configuration. Additionally, this API structure could potentially pave the way for other official plugins (if any) like 'algolia', although that's beyond the scope of this comment.

What are your thoughts on this approach?

@delucis
Copy link
Member Author

delucis commented Nov 25, 2023

this API structure could potentially pave the way for other official plugins

Interesting idea! But I'm pretty confident that we won't have other search providers built-in. Feedback about Pagefind has been very positive and it fits really nicely into Starlight's architecture. So this option would end up having only one possible value, which suggests the Boolean toggle probably works well I think.

Alternative search providers could still be added via the new plugins API (#942) but they would then be configured in the plug-in options rather than in the global Starlight config.

Copy link
Member

@kevinzunigacuellar kevinzunigacuellar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lively Groove, Tune Mastered!

@delucis delucis merged commit 7c0b8cb into main Nov 29, 2023
8 checks passed
@delucis delucis deleted the dx-617/pagefind-disable branch November 29, 2023 19:31
@astrobot-houston astrobot-houston mentioned this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants