mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 23:49:51 +00:00
Add missing changesets
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
'fumadocs-core': major
|
||||
---
|
||||
|
||||
**Migrate to rehype-shikiji**
|
||||
|
||||
- Dropped support for inline code syntax highlighting
|
||||
- Use notation-based word/line highlighting instead of meta string
|
||||
|
||||
Before:
|
||||
|
||||
````md
|
||||
```ts /config/ {1}
|
||||
const config = "Hello"
|
||||
|
||||
something.call(config)
|
||||
```
|
||||
````
|
||||
|
||||
After:
|
||||
|
||||
````md
|
||||
```ts
|
||||
// [!code word:config]
|
||||
const config = "Hello" // [!code highlight]
|
||||
|
||||
something.call(config)
|
||||
```
|
||||
````
|
||||
|
||||
Read the docs of Shikiji for more information.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
'fumadocs-ui': major
|
||||
---
|
||||
|
||||
**Change usage of Code Block component**
|
||||
|
||||
The inner `pre` element is now separated from code block container, making it easier to customise.`
|
||||
|
||||
Before:
|
||||
|
||||
```tsx
|
||||
import { CodeBlock, Pre } from 'fumadocs-ui/mdx/pre';
|
||||
|
||||
<Pre title={title} allowCopy {...props} />
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```tsx
|
||||
import { CodeBlock, Pre } from 'fumadocs-ui/mdx/pre';
|
||||
|
||||
<CodeBlock title={title} allowCopy>
|
||||
<Pre {...props} />
|
||||
</CodeBlock>
|
||||
```
|
||||
|
||||
|
||||
@@ -8,13 +8,14 @@ import { CodeBlock, Pre } from 'fumadocs-ui/mdx/pre';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Wrapper } from '@/components/preview/wrapper';
|
||||
import { AutoTypeTable } from './components/doc';
|
||||
import { cn } from './utils/cn';
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
...defaultComponents,
|
||||
pre: ({ ref: _ref, title, ...props }) => (
|
||||
pre: ({ ref: _ref, title, className, ...props }) => (
|
||||
<CodeBlock title={title}>
|
||||
<Pre className="max-h-[400px]" {...props} />
|
||||
<Pre className={cn('max-h-[400px]', className)} {...props} />
|
||||
</CodeBlock>
|
||||
),
|
||||
AutoTypeTable,
|
||||
|
||||
+14
-18
@@ -10,39 +10,35 @@ const { TOCItems, Breadcrumb, LastUpdate, Footer } = await import(
|
||||
'./page.client'
|
||||
);
|
||||
|
||||
type TableOfContentOptions = Partial<
|
||||
Omit<TOCProps, 'items'> & {
|
||||
enabled: boolean;
|
||||
component: ReactNode;
|
||||
}
|
||||
>;
|
||||
|
||||
type BreadcrumbOptions = Partial<{
|
||||
type TableOfContentOptions = Omit<TOCProps, 'items'> & {
|
||||
enabled: boolean;
|
||||
component: ReactNode;
|
||||
}>;
|
||||
};
|
||||
|
||||
type FooterOptions = Partial<
|
||||
FooterProps & {
|
||||
enabled: boolean;
|
||||
component: ReactNode;
|
||||
}
|
||||
>;
|
||||
interface BreadcrumbOptions {
|
||||
enabled: boolean;
|
||||
component: ReactNode;
|
||||
}
|
||||
|
||||
interface FooterOptions extends FooterProps {
|
||||
enabled: boolean;
|
||||
component: ReactNode;
|
||||
}
|
||||
|
||||
export interface DocsPageProps {
|
||||
toc?: TableOfContents;
|
||||
|
||||
tableOfContent?: TableOfContentOptions;
|
||||
tableOfContent?: Partial<TableOfContentOptions>;
|
||||
|
||||
/**
|
||||
* Replace or disable breadcrumb
|
||||
*/
|
||||
breadcrumb?: BreadcrumbOptions;
|
||||
breadcrumb?: Partial<BreadcrumbOptions>;
|
||||
|
||||
/**
|
||||
* Footer navigation, you can disable it by passing `false`
|
||||
*/
|
||||
footer?: FooterOptions;
|
||||
footer?: Partial<FooterOptions>;
|
||||
|
||||
lastUpdate?: Date | string | number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user