mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
28 lines
669 B
TypeScript
28 lines
669 B
TypeScript
import { RenderContext } from '@/types';
|
|
import { processDocument } from '@/utils/process-document';
|
|
import { configDefault } from 'fumadocs-core/highlight';
|
|
import Slugger from 'github-slugger';
|
|
|
|
export async function renderContextFrom(input: string): Promise<RenderContext> {
|
|
const schema = await processDocument(input);
|
|
|
|
return {
|
|
mediaAdapters: {},
|
|
generateTypeScriptDefinitions() {
|
|
return '';
|
|
},
|
|
shiki: configDefault,
|
|
renderCodeBlock(_lang, code) {
|
|
return code;
|
|
},
|
|
renderHeading(_depth, text) {
|
|
return text;
|
|
},
|
|
renderMarkdown(text) {
|
|
return text;
|
|
},
|
|
schema,
|
|
slugger: new Slugger(),
|
|
};
|
|
}
|