mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
feat: update docs
This commit is contained in:
parent
70b5aee381
commit
e12a80b24e
14 changed files with 205 additions and 170 deletions
27
docs-site/src/app/[[...mdxPath]]/page.jsx
Normal file
27
docs-site/src/app/[[...mdxPath]]/page.jsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { generateStaticParamsFor, importPage } from 'nextra/pages';
|
||||
import { useMDXComponents as getMDXComponents } from '../../../mdx-components';
|
||||
|
||||
export const generateStaticParams = generateStaticParamsFor('mdxPath');
|
||||
|
||||
export async function generateMetadata(props) {
|
||||
const params = await props.params;
|
||||
const { metadata } = await importPage(params.mdxPath);
|
||||
return metadata;
|
||||
}
|
||||
|
||||
const Wrapper = getMDXComponents().wrapper;
|
||||
|
||||
export default async function Page(props) {
|
||||
const params = await props.params;
|
||||
const {
|
||||
default: MDXContent,
|
||||
toc,
|
||||
metadata,
|
||||
sourceCode,
|
||||
} = await importPage(params.mdxPath);
|
||||
return (
|
||||
<Wrapper toc={toc} metadata={metadata} sourceCode={sourceCode}>
|
||||
<MDXContent {...props} params={params} />
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue