MCPcopy Create free account
hub / github.com/fontsource/fontsource / renderAllDocsMarkdown

Function renderAllDocsMarkdown

website/app/utils/docs/markdown.server.ts:55–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53};
54
55const renderAllDocsMarkdown = async () => {
56 const pages = source.getPages();
57 const chunks = await Promise.all(
58 pages.map(async (page) => {
59 const text = await getDocsPageMarkdown(page);
60 return `# ${page.data.title}\n\nSource: ${page.url}\n\n${text}`;
61 }),
62 );
63
64 return chunks.join('\n\n---\n\n');
65};
66
67export const getDocsPageMarkdown = (page: MarkdownPage) => {
68 if (!cacheDocsMarkdown) return renderDocsPageMarkdown(page);

Callers 1

getAllDocsMarkdownFunction · 0.85

Calls 1

getDocsPageMarkdownFunction · 0.85

Tested by

no test coverage detected