VitePress logo
Documentation Platforms

VitePress AI Integration

AI-powered search and chat for VitePress sites

What is it?

About VitePress

VitePress is a Vite and Vue-powered static site generator purpose-built for documentation. It is used by many Vue.js and Vite ecosystem projects to publish fast, lightweight documentation sites from Markdown.

Integration capabilities

How BeforeQuery works with VitePress

Everything you can do once the VitePress integration is connected.

Static site crawling

VitePress generates clean HTML from Markdown. BeforeQuery crawls the published static site and normalizes each page into searchable chunks.

Frontmatter metadata extraction

The BeforeQuery crawler extracts frontmatter-derived titles and descriptions to improve retrieval accuracy and source-attribution quality.

Simple script tag embed

Add the BeforeQuery widget script to VitePress's head configuration. No custom component required.

Sync on CI deploy

Trigger a BeforeQuery sync from your GitHub Actions or Netlify/Vercel deploy pipeline after each VitePress build.

Setup

How to connect VitePress

  1. Step 01

    Add your deployed VitePress site URL as a source in BeforeQuery. The sitemap is used to discover all documentation pages.

  2. Step 02

    Trigger the first crawl and review the indexed pages in the BeforeQuery dashboard to confirm coverage.

  3. Step 03

    Add the widget script to VitePress's head config in .vitepress/config.ts to show the chat launcher on every page.

VitePress — Frequently Asked Questions

Common questions about connecting BeforeQuery to VitePress.

Add the widget script tag to the head option in your .vitepress/config.ts file using the transformHead or head configuration. The widget will appear on every page of your VitePress site without requiring a custom Vue component.
Yes, they work independently. You can keep VitePress's built-in Algolia or local search for exact keyword lookup and add BeforeQuery alongside it for AI-powered conversational answers with source paragraphs.
Add a step in your GitHub Actions or Vercel/Netlify deploy pipeline to call the BeforeQuery sync API after each successful build. This triggers an incremental re-index so answers reflect the latest content within minutes of a deploy.
Yes. BeforeQuery's crawler extracts frontmatter-derived titles and descriptions from VitePress pages to improve chunking quality and source-attribution accuracy. Page titles from frontmatter are used as document titles in sources.
Yes. Configure URL exclusion patterns in your BeforeQuery source settings to skip pages you do not want indexed — for example, pages under /internal or pages with a noindex robots directive.

Ready to connect VitePress?

Start free. No credit card required. Connect your first integration in under 5 minutes.