This project uses the Fumadocs framework for documentation.
-
Install dependencies:
pnpm install
-
Run the development server:
pnpm run dev
-
Open http://localhost:3000 in your browser
- Documentation files are located in
/content/docs/ - Main layout configuration is in
/app/layout.tsx - MDX configuration is in
/source.config.ts
To learn more about using Fumadocs and its Markdown features:
- Visit the official Fumadocs documentation: https://fumadocs.dev/docs
- Key sections to explore:
For comprehensive guidelines on transferring content from external sources to Fumadocs, see the Content Transfer Guideline.
.
├── app/ # Next.js app directory
├── content/
│ └── docs/ # Documentation files (.mdx)
├── lib/ # Library files
├── source.config.ts # MDX configuration
└── package.json # Project dependencies
- Create a new
.mdxfile in/content/docs/ - Add frontmatter at the top:
--- title: Your Document Title description: Brief description ---
- Write your content using Markdown and MDX syntax
- The new page will automatically be available at
/docs/your-filename
This project is configured with KaTeX for mathematical expressions:
- Inline math:
$$E = mc^2$$ - Block math:
$$ \sum_{i=1}^{n} x_i = \frac{n(n+1)}{2} $$
For more details on using math expressions, see the Math Guide.
When adding new documentation, follow these best practices:
-
Use proper MDX syntax: Avoid mixing HTML and MDX syntax. Use Markdown syntax for images (
) instead of HTML<img>tags. -
File structure: Place sub-articles in appropriately named subdirectories under
/content/docs/. -
Frontmatter: Always include proper frontmatter with title and description.
-
Image handling: Copy all referenced images to the
/public/imagesdirectory and reference them using absolute paths (e.g.,/images/filename.webp). -
Inline styles: When using inline styles in HTML tags within MDX, use JavaScript object syntax (e.g.,
<mark style={{backgroundColor: 'red'}}>text</mark>) instead of CSS string syntax. -
Testing: After adding new content, clean the build cache (
rm -rf .next) and restart the development server to ensure proper compilation. -
Validation: Verify that both the new content and existing content are accessible through the browser.