Skip to content

feat(search): upgrade search to DocSearch v4-beta#4843

Merged
brc-dd merged 25 commits intovuejs:mainfrom
dylantientcheu:feat/docsearch-v4
Jul 26, 2025
Merged

feat(search): upgrade search to DocSearch v4-beta#4843
brc-dd merged 25 commits intovuejs:mainfrom
dylantientcheu:feat/docsearch-v4

Conversation

@dylantientcheu
Copy link
Copy Markdown
Contributor

@dylantientcheu dylantientcheu commented Jul 15, 2025

Description

We are upgrading DocSearch to v4. There's a few changes brought by this PR.

Linked Issues

N/A

Additional Context

Motivation

image
  • 10 years of DocSearch!
    It’s been a decade since DocSearch was launched, empowering millions of developers to find documentation faster and more intuitively.

  • 5 years since DocSearch v3:
    After half a decade of feedback and innovation, we’re excited to unveil the next major leap.

  • We 💙 VitePress: VitePress's integration has been crucial to DocSearch's growth. We recognise the awesome work done to make the setup smooth.

  • This PR updates DocSearch to its latest version (v4) and introduces the Ask AI feature, reflecting our vision for the next generation of documentation search. Our goal is to provide a more powerful, accessible, and intelligent search experience for your users.

  • Ask AI is completely optional and never enabled by default. DocSearch v4 can be used independently of Ask AI, giving you full control over your integration.

What is included in this PR

  • Upgraded the version of docsearch to use the latest beta
  • Added the new askAi prop
  • Added the new translation keys for docsearch
  • Update Algolia Search documentation section.

Test Plan

Try the new search experience by clicking the search button or using the keyboard shortcut (Cmd + K or Ctrl + K).

vitepress.mp4

Features

DocSearch v4

  • Completely modernized UI: DocSearch v4 features a brand new, ground-up redesign for a more intuitive and visually appealing experience.
  • Still 💯 Free: DocSearch stays free for all eligible documentation/technical blog websites as it has always been.
  • Core functionality preserved: All the features users love from previous versions remain, ensuring a seamless transition.
  • Customization-first: Extensive customization options remain at the heart of DocSearch, allowing you to tailor the look and feel to your brand.
  • Recent searches & favorites: Continue to quickly revisit previous keyword searches and save favorites for easy access.
  • Enhanced accessibility and performance: Improved ARIA support, keyboard navigation, and even faster load times.
  • Mobile-optimized: Responsive and touch-friendly for a great experience on any device.
  • Dark mode: Seamless integration with your site’s dark theme.

Ask AI

  • Conversational search: Users can ask questions in natural language and get context-aware answers.
  • Completely free: Ask AI is available at no additional cost.
  • BYOLLM (Bring Your Own LLM): You can use your own language model provider, giving you full control over the AI experience.
  • Direct Algolia index integration: The provider/models retrieve relevant context directly from your Algolia index, ensuring accurate and up-to-date answers.
  • Recently asked & conversation history: Easily revisit your recent questions and jump back into previous Ask AI conversations.
  • Seamless integration: Ask AI is available directly from the search modal.

Related issues/PRs

References:


Tip

The author of this PR can publish a preview release by commenting /publish below.

@dylantientcheu
Copy link
Copy Markdown
Contributor Author

/publish

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jul 15, 2025

npm i https://pkg.pr.new/vitepress@4843

commit: 7a682d7

Comment thread types/docsearch.d.ts Outdated
Comment thread package.json Outdated
Co-authored-by: Divyansh Singh <[email protected]>
@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Jul 15, 2025

Thanks! Bumping docsearch to v4-beta was on my radar as well.

Preview link is this - https://deploy-preview-4843--vitepress-docs.netlify.app/

Few todos:

(You can skip them if you want. I can fix them.)

PS: The links in description (https://docsearch.algolia.com/ask-ai, etc.) seem broken? Or are v4 docs not deployed on main site yet? 👀

@brc-dd brc-dd added the theme Related to the theme label Jul 15, 2025
Co-authored-by: Divyansh Singh <[email protected]>
@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Jul 15, 2025

Ah, you'll need to run pnpm i again locally and push.

@dylantientcheu
Copy link
Copy Markdown
Contributor Author

dylantientcheu commented Jul 15, 2025

Yeah, thanks, I'll handle those, pnpm i, CSS and translations (are you okay if I use AI for these?)

Yes the docs are not on the main site yet. You can preview them here: https://deploy-preview-2666--docsearch.netlify.app/docs/v4/askai

i had to upgrade pnpm to v10 for it to work properly

@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Jul 15, 2025

are you okay if I use AI for these?

Yeah sure.

@dylantientcheu
Copy link
Copy Markdown
Contributor Author

all good over here @brc-dd
let me know if you find any issue

@dylantientcheu dylantientcheu requested a review from brc-dd July 24, 2025 12:22
@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Jul 24, 2025

Thanks a lot! I'll review and merge by the weekend.

@brc-dd brc-dd linked an issue Jul 24, 2025 that may be closed by this pull request
3 tasks
@brc-dd brc-dd self-assigned this Jul 24, 2025
@brc-dd brc-dd merged commit ac61abe into vuejs:main Jul 26, 2025
10 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cr-tracked theme Related to the theme

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with peer dependencies

3 participants