Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Host pre-aggregated LLM knowledge files #1355

Merged
merged 7 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -164,3 +164,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 @@ -39,6 +39,7 @@
"typedoc-vitepress-theme": "1.0.0-next.3",
"typescript": "^5.6.3",
"vitepress": "^1.5.0",
"vitepress-knowledge": "^0.3.0",
"vitest-mock-extended": "^2.0.2",
"vue": "^3.5.12",
"wxt": "workspace:*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('Content Script Utils', () => {
it('should return a string containing all the options with defaults applied', () => {
const hash = hashContentScriptOptions({ matches: [] });

expect(hash).toMatchInlineSnapshot(
`"[["all_frames",false],["exclude_globs",[]],["exclude_matches",[]],["include_globs",[]],["match_about_blank",false],["match_origin_as_fallback",false],["matches",[]],["run_at","document_idle"],["world","ISOLATED"]]"`,
expect(hash).toEqual(
'[["all_frames",false],["exclude_globs",[]],["exclude_matches",[]],["include_globs",[]],["match_about_blank",false],["match_origin_as_fallback",false],["matches",[]],["run_at","document_idle"],["world","ISOLATED"]]',
);
});

Expand Down
120 changes: 111 additions & 9 deletions pnpm-lock.yaml

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

Loading