This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / lib / markup / render.ts
424 B 13 lines
1import { isMarkdownFile } from "./format"; 2import type { MarkupContext } from "./paths"; 3 4export const renderDocument = async ( 5 filename: string, 6 contents: string, 7 ctx: MarkupContext 8): Promise<string | null> => { 9 if (!isMarkdownFile(filename)) return null; 10 const { SOURCE_LIMIT, renderMarkdown } = await import("./markdown"); 11 if (contents.length > SOURCE_LIMIT) return null; 12 return renderMarkdown(contents, ctx); 13};