Skip to content

Vitepress Valence

Installation

  1. Download the package from NPM:

    bash
    npm i @cynber/vitepress-valence
    bash
    pnpm add @cynber/vitepress-valence
    bash
    yarn add @cynber/vitepress-valence
  2. Edit your index.ts (ex. docs/.vitepress/theme/index.ts) and config.ts (ex. docs/.vitepress/config.ts) files to import the CSS file and configure Vite to not externalize the package.

    ts
    import './style.css'
    import '@cynber/vitepress-valence/style.css'
    // ...
    ts
    export default defineConfig({
      // ...
      vite: { 
        ssr: { noExternal: ['@cynber/vitepress-valence']} 
      }, 
      // ...
    })
  3. Import components as needed. See the following pages for more information.