mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
Improve docs
This commit is contained in:
@@ -39,7 +39,7 @@ export default async function Page(props: PageProps<'/blog/[slug]'>) {
|
||||
<p className="text-fd-muted-foreground mb-8">{page.data.description}</p>
|
||||
|
||||
<div className="prose min-w-0 flex-1">
|
||||
<div className="flex flex-row items-center gap-2 mb-8 not-prose">
|
||||
<div className="flex flex-row gap-2 mb-8 not-prose">
|
||||
<ShareButton url={page.url} />
|
||||
<Link
|
||||
href="/blog"
|
||||
|
||||
@@ -41,6 +41,19 @@ import { docs } from 'fumadocs-mdx:collections/dynamic';
|
||||
import browserCollections from 'fumadocs-mdx:collections/browser';
|
||||
```
|
||||
|
||||
To use `loader()` with doc collections, use the new `toFumadocsSource()` utility instead.
|
||||
|
||||
```ts
|
||||
import { blogPosts } from 'fumadocs-mdx:collections/server';
|
||||
import { toFumadocsSource } from 'fumadocs-mdx/runtime/server';
|
||||
import { loader } from 'fumadocs-core/source';
|
||||
|
||||
export const blog = loader({
|
||||
baseUrl: '/blog',
|
||||
source: toFumadocsSource(blogPosts, []),
|
||||
});
|
||||
```
|
||||
|
||||
### Async & Dynamic Mode
|
||||
|
||||
On Next.js, **Async Mode** now aligns with the behaviour on Vite to generate async imports. This enables server-side chunking to improve memory usage.
|
||||
|
||||
Reference in New Issue
Block a user