MCPcopy Create free account
hub / github.com/Milkdown/website / getDocById

Function getDocById

src/pages/api/docs.ts:6–9  ·  view source on GitHub ↗
(id: string, scope: string)

Source from the content-addressed store, hash-verified

4const docsDir = join(process.cwd(), 'docs')
5
6export function getDocById(id: string, scope: string) {
7 const path = join(docsDir, scope, `${id}.md`)
8 return readFile(path, 'utf-8')
9}

Callers 2

getStaticPropsFunction · 0.90
getStaticPropsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected