vetradocs-scalar
v0.0.1
Published
Generic Web Component for Vetradocs Chat (Scalar, HTML, etc.)
Readme
Vetradocs Scalar / Web Component
Generic AI Chat Widget for Scalar Docs, HTML sites, and other frameworks.
Installation
npm install vetradocs-scalarUsage
1. In Scalar (or any HTML site)
Load the script and add the widget to your page.
<!-- Load the widget -->
<script type="module" src="./node_modules/vetradocs-scalar/dist/vetradocs-scalar.js"></script>
<!-- Add the widget -->
<vetradocs-widget
api-endpoint="/api/chat"
index-path="/search-index.json"
title="Scalar AI"
accent-color="#8e4ec6"
></vetradocs-widget>2. Generate Search Index
Use the included build script to index your Markdown files (if using Markdown).
npx vetradocs-build-generic --docs ./docs --output ./public/search-index.jsonIf you are using Scalar with OpenAPI and need to index the Spec, you will need to implement a custom indexer that feeds the Orama DB with your Spec data. The provided script works for Markdown-based documentation.
