Skip to content

feat(search): add moss search provider support#5114

Closed
yatharthk2 wants to merge 4 commits intovuejs:mainfrom
usemoss:vitepress-moss-plugin
Closed

feat(search): add moss search provider support#5114
yatharthk2 wants to merge 4 commits intovuejs:mainfrom
usemoss:vitepress-moss-plugin

Conversation

@yatharthk2
Copy link

@yatharthk2 yatharthk2 commented Feb 6, 2026

Description

This pull request introduces Moss as a third search provider option, sitting alongside the existing Algolia and Local search implementations.

The integration enables a seamless, automated indexing workflow directly within the build pipeline. By using the new Moss indexer plugin, documentation content is automatically synced with the Moss platform during the client build, allowing for high-performance semantic search capabilities with minimal configuration.

Most important changes:

  • Moss Search Provider Integration: Added @inferedge/moss for client-side search and @moss-tools/md-indexer for build-time indexing.
  • VitePress Build Pipeline: Registered mossIndexerPlugin in the VitePress build process. This plugin automatically syncs markdown content with Moss when enabled, ensuring the search index is always up to date after a deployment.
  • Dynamic UI Updates: Updated VPNavBarSearch.vue to dynamically resolve the search provider. If moss is selected in the theme configuration, the new VPMossSearchBox.vue component is rendered with full keyboard shortcut support (Ctrl+K / Cmd+K).
  • Conditional Logic: Implemented the MOSS global constant to ensure that Moss-specific code and dependencies are only bundled when the provider is explicitly active, maintaining parity with how Algolia and Local search are handled.

Reference

yatharthk2 and others added 4 commits February 3, 2026 11:03
Add integration for InferEdge Moss search provider as an alternative 
search option for VitePress sites. Enable the Moss search provider 
by setting `themeConfig.search.provider` to 'moss' in the site 
configuration.

Include the following updates:
- Add new VPMossSearchBox component with full search UI
- Implement Moss indexer plugin for build-time indexing
- Integrate with existing VPNavBarSearch component
- Add type definitions for Moss search configuration
- Add InferEdge logo asset for search UI
* fix: always log error when failed to fetch page

* fix(theme): add fallback for `heroImageSlotExists`  (vuejs#5076)

for users who are importing VPHero in custom theme

* fix(theme): align badges in h1 and h2 (vuejs#5087) (closes vuejs#5063)

* fix(theme): highlight active link in mobile nav menu (vuejs#5086) (closes vuejs#5068, closes vuejs#5074)

* feat(theme): use `@layer __vitepress_base` to wrap the styles in base.css (vuejs#4905)

* fix(theme): remove margin between code groups and blocks in markdown containers

closes vuejs#5099

* docs: add vitepress-plugin-typesense npm link (vuejs#5100)

* feat(theme): upgrade DocSearch to 4.5 with sidepanel (vuejs#5092)

---------

Co-authored-by: Divyansh Singh <[email protected]>

* release: v2.0.0-alpha.16

* chore: adjust heading level

* feat(theme): support specifying list of details in home page features (closes vuejs#5101)

* feat(theme): enable text-autospace and text-spacing-trim (closes vuejs#4996)

* feat(theme): add Japanese translation for "copied" label (vuejs#5106)

* fix(theme): add `rel="alternate"` and `hreflang` to links in language menu (vuejs#5108)

* fix(theme): keep pnum,tnum features in Inter

closes vuejs#5096

* chore: bump deps, remove rimraf

* Refactor code structure for improved readability and maintainability

* reverted changes: update button text and aria-label for local search provider

* fix: add vite-ignore comment for dynamic import of MossClient

* docs: format

* fix: `processIncludes` no longer swallows errors

**BREAKING CHANGE:**
The previous `<!-- @include: ./path/to/file -->` syntax silently ignored errors when files did not exist. This behavior was originally intended as an escape hatch while documenting includes, but better solutions now exist using Shiki transformers.

For most users, no code changes are required. If you now see errors, it means your includes are broken and were previously not being reported.

Users who intentionally reference non-existent files or want to document includes without resolving them can configure `markdown.codeTransformers` with a `postprocess` hook. See `docs/.vitepress/config.ts` in this repo for an example.

* docs: add Hostinger to deployment guide (vuejs#5111)

* docs: sync deploy guides

* docs: fix typo

* fix(theme): navbar menu group is incorrectly highlighted (vuejs#5113)

---------

Co-authored-by: Divyansh Singh <[email protected]>

* feat(types): add MaxMatchPerPage option to DefaultTheme

---------

Co-authored-by: Evan You <[email protected]>
Co-authored-by: Michael Cozzolino <[email protected]>
Co-authored-by: seeksky <[email protected]>
Co-authored-by: hotdogc1017 <[email protected]>
Co-authored-by: Divyansh Singh <[email protected]>
Co-authored-by: Hayden Hung Hoang <[email protected]>
Co-authored-by: Dylan Tientcheu <[email protected]>
Co-authored-by: Tatsunori Uchino <[email protected]>
Co-authored-by: agneliutkiene <[email protected]>
Co-authored-by: WizardsBowl <[email protected]>
@brc-dd
Copy link
Member

brc-dd commented Feb 6, 2026

Hi, we won't be adding any other third-party providers in the core. Please create and publish a separate package. You can use other plugins mentioned in the search docs as reference. We can link here once it's available. You probably will need to export a search component to register in nav-bar-content-before slot and the vite plugin you wrote here.

@brc-dd brc-dd closed this Feb 6, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants