Skip to content

Commit 5ebeabb

Browse files
committed
docs: Host pre-aggregated LLM knowledge files
1 parent fb6a298 commit 5ebeabb

File tree

5 files changed

+121
-11
lines changed

5 files changed

+121
-11
lines changed

docs/.vitepress/config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { version as i18nVersion } from '../../packages/i18n/package.json';
1414
import { version as autoIconsVersion } from '../../packages/auto-icons/package.json';
1515
import { version as unocssVersion } from '../../packages/unocss/package.json';
1616
import { version as storageVersion } from '../../packages/storage/package.json';
17+
import knowledge from 'vitepress-knowledge';
1718

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

2627
// https://vitepress.dev/reference/site-config
2728
export default defineConfig({
29+
extends: knowledge({
30+
paths: {
31+
'/': 'docs',
32+
'/api/': 'api-reference',
33+
},
34+
pageSelectors: {
35+
'examples.md': '#VPContent > .VPPage',
36+
},
37+
}),
38+
2839
titleTemplate: `:title${titleSuffix}`,
2940
title: 'WXT',
3041
description,

docs/.vitepress/utils/menus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export function menuRoot(items: SidebarItem[]) {
2828
export function menuGroup(
2929
text: string,
3030
items: SidebarItem[],
31-
collapsable?: boolean,
31+
collapsible?: boolean,
3232
): SidebarItem;
3333
export function menuGroup(
3434
text: string,
3535
base: string,
3636
items: SidebarItem[],
37-
collapsable?: boolean,
37+
collapsible?: boolean,
3838
): SidebarItem;
3939
export function menuGroup(
4040
text: string,

docs/guide/resources/faq.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,11 @@ This is usually caused by one of two things (or both) when using `createShadowRo
162162
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.
163163

164164
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.
165+
166+
## Is there an LLM trained on WXT's docs that I chat with?
167+
168+
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:
169+
170+
- Index listing available knowledge files: https://wxt.dev/.wellknown/knowledge/index.json
171+
172+
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!

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"typedoc-vitepress-theme": "1.0.0-next.3",
3838
"typescript": "^5.6.3",
3939
"vitepress": "^1.5.0",
40+
"vitepress-knowledge": "^0.2.11",
4041
"vitest-mock-extended": "^2.0.2",
4142
"vue": "^3.5.12",
4243
"wxt": "workspace:*"

pnpm-lock.yaml

Lines changed: 99 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)