readMarkdownSource #
Reads a Markdown page and expands its includes and snippets.
Usage #
TypeScript
import { readMarkdownSource } from 'kawapress/generator'
const page = readMarkdownSource({
file: '/site/a.md',
sourceRoot: '/site',
})Parameters
locationMarkdownSourceLocation
Where the page is.
filestring
Absolute path of the Markdown file.
sourceRootstring
Absolute source directory, which @/ paths start from.
Returns The expanded source with the files it was read from.
Full type signature
TypeScript
function readMarkdownSource(location: MarkdownSourceLocation): ExpandedMarkdownSource

Comments