feat: migrate docs to Fumadocs framework
- Auto-generated sidebar from file structure - Built-in search and TOC - MDX native support with frontmatter - Removed hand-written Sidebar component - Docs now at /docs/* route (Landing/Blocks/Create/Examples unchanged) - Content in content/docs/ as MDX files
This commit is contained in:
@@ -1,28 +1,13 @@
|
||||
import createMDX from '@next/mdx';
|
||||
import rehypePrettyCode from 'rehype-pretty-code';
|
||||
import { createMDX } from 'fumadocs-mdx/next';
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: 'export',
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
|
||||
images: { unoptimized: true },
|
||||
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
|
||||
transpilePackages: ['newspaperui'],
|
||||
};
|
||||
|
||||
const withMDX = createMDX({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
rehypePlugins: [
|
||||
[
|
||||
rehypePrettyCode,
|
||||
{
|
||||
theme: 'github-dark',
|
||||
keepBackground: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
});
|
||||
const withMDX = createMDX();
|
||||
|
||||
export default withMDX(nextConfig);
|
||||
|
||||
Reference in New Issue
Block a user