Commit 89ca81d1 by Archer Committed by GitHub

fix: document deploy (#5867)

parent bf33f7af
import { createMDX } from 'fumadocs-mdx/next';
const withMDX = createMDX({
mdxOptions: {
remarkPlugins: {
image: {
checkImageSize: false
}
}
}
});
const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
......
......@@ -17,6 +17,8 @@ export const docs = defineDocs({
export default defineConfig({
lastModifiedTime: 'git',
mdxOptions: {
// MDX options
remarkImageOptions: {
external: false
}
}
});
......@@ -63,7 +63,7 @@ const strIsMdTable = (str: string) => {
return true;
};
const markdownTableSplit = (props: SplitProps): SplitResponse => {
let { text = '', chunkSize } = props;
let { text = '', chunkSize, maxSize = defaultMaxChunkSize } = props;
// split by rows
const splitText2Lines = text.split('\n').filter((line) => line.trim());
......@@ -93,7 +93,17 @@ ${mdSplitString}
// Over size
if (chunkLength + nextLineLength > chunkSize) {
chunks.push(chunk);
// 单行非常的长,直接分割
if (chunkLength > maxSize) {
const newChunks = commonSplit({
...props,
text: chunk
}).chunks;
chunks.push(...newChunks);
} else {
chunks.push(chunk);
}
chunk = defaultChunk;
}
chunk += `${splitText2Lines[i]}\n`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment