Skip to content
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
264 changes: 264 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@rsbuild/plugin-sass": "^1.4.0",
"@rspress/core": "^2.0.0-beta.31",
"@rspress/plugin-llms": "2.0.0-beta.31",
"@rspress/plugin-algolia": "2.0.0-beta.31",
"@rstack-dev/doc-ui": "1.11.0",
"@rstest/tsconfig": "workspace:*",
"@types/node": "^22.13.8",
Expand Down
4 changes: 4 additions & 0 deletions website/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'node:path';
import { pluginSass } from '@rsbuild/plugin-sass';
import { defineConfig } from '@rspress/core';
import { pluginAlgolia } from '@rspress/plugin-algolia';
import { pluginLlms } from '@rspress/plugin-llms';
import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics';
import { pluginOpenGraph } from 'rsbuild-plugin-open-graph';
Expand Down Expand Up @@ -73,6 +74,9 @@ export default defineConfig({
],
},
plugins: [
pluginAlgolia({
verificationContent: '71ECBF977243215D',
}),
pluginFontOpenSans(),
pluginSitemap({
domain: siteUrl,
Expand Down
24 changes: 23 additions & 1 deletion website/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { useLang } from '@rspress/core/runtime';
import {
Layout as BaseLayout,
getCustomMDXComponent as basicGetCustomMDXComponent,
} from '@rspress/core/theme';
import {
Search as PluginAlgoliaSearch,
ZH_LOCALES,
} from '@rspress/plugin-algolia/runtime';
import {
LlmsContainer,
LlmsCopyButton,
Expand Down Expand Up @@ -32,10 +37,27 @@ export function getCustomMDXComponent() {
};
}

const Search = () => {
const lang = useLang();
return (
<PluginAlgoliaSearch
docSearchProps={{
appId: 'TRUZL3HFAU', // cspell:disable-line
apiKey: '3cf720e0589287b96f68a8c7bad7f682', // cspell:disable-line
indexName: 'rstest',
searchParameters: {
facetFilters: [`lang:${lang}`],
},
}}
locales={ZH_LOCALES}
/>
);
};

const Layout = () => {
return <BaseLayout beforeNavTitle={<NavIcon />} />;
};

export { Layout, HomeLayout };
export { Search, Layout, HomeLayout };

export * from '@rspress/core/theme';
Loading