Skip to content

Commit

Permalink
docs: Host pre-aggregated LLM knowledge files
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Jan 15, 2025
1 parent fb6a298 commit 5ebeabb
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 11 deletions.
11 changes: 11 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { version as i18nVersion } from '../../packages/i18n/package.json';
import { version as autoIconsVersion } from '../../packages/auto-icons/package.json';
import { version as unocssVersion } from '../../packages/unocss/package.json';
import { version as storageVersion } from '../../packages/storage/package.json';
import knowledge from 'vitepress-knowledge';

const title = 'Next-gen Web Extension Framework';
const titleSuffix = ' – WXT';
Expand All @@ -25,6 +26,16 @@ const ogImage = 'https://wxt.dev/social-preview.png';

// https://vitepress.dev/reference/site-config
export default defineConfig({
extends: knowledge({
paths: {
'/': 'docs',
'/api/': 'api-reference',
},
pageSelectors: {
'examples.md': '#VPContent > .VPPage',
},
}),

titleTemplate: `:title${titleSuffix}`,
title: 'WXT',
description,
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/utils/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ export function menuRoot(items: SidebarItem[]) {
export function menuGroup(
text: string,
items: SidebarItem[],
collapsable?: boolean,
collapsible?: boolean,
): SidebarItem;
export function menuGroup(
text: string,
base: string,
items: SidebarItem[],
collapsable?: boolean,
collapsible?: boolean,
): SidebarItem;
export function menuGroup(
text: string,
Expand Down
8 changes: 8 additions & 0 deletions docs/guide/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,11 @@ This is usually caused by one of two things (or both) when using `createShadowRo
Both issues have the same cause: the library puts something outside the `ShadowRoot`, and the `ShadowRoot`'s isolation prevents CSS from being applied to your UI.

Both issues have the same fix: tell the library to put elements inside the `ShadowRoot`, not outside it. See the details above for more information and example fixes for each problem.

## Is there an LLM trained on WXT's docs that I chat with?

Not yet, but we're working on it. For now, https://wxt.dev hosts pre-aggregated and pre-formatted knowledge files containing all the docs from this website:

- Index listing available knowledge files: https://wxt.dev/.wellknown/knowledge/index.json

You don't need to crawl the entire website, these files already contain all the relevant docs for training a LLM on WXT. But feel free to crawl it and generate your own files if you want!
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"typedoc-vitepress-theme": "1.0.0-next.3",
"typescript": "^5.6.3",
"vitepress": "^1.5.0",
"vitepress-knowledge": "^0.2.11",
"vitest-mock-extended": "^2.0.2",
"vue": "^3.5.12",
"wxt": "workspace:*"
Expand Down
108 changes: 99 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ebeabb

Please sign in to comment.