include()
ts
function include(path, options?): Node;Defined in: include.ts:84
Builder-element for an include directive
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Path to the file to include |
options? | IncludeOptions | Options for the include directive |
Returns
A markdown node
Example
ts
import { define, include } from "@ogs-gmbh/markdown";
const markdown = define(
include("path/to/file.md", { range: { from: 5, to: 10 } })
);
console.assert(
markdown.toString()
);See
https://vitepress.dev/guide/markdown#markdown-file-inclusion
Since
1.0.0
Author
Simon Kovtyk