* Loads the page at the specified path, returning a promise to the parsed * page object.
(path: string, options: LoadOptions & ParseOptions, effects?: LoadEffects)
| 78 | * page object. |
| 79 | */ |
| 80 | async loadPage(path: string, options: LoadOptions & ParseOptions, effects?: LoadEffects): Promise<MarkdownPage> { |
| 81 | const loader = this.findPage(path); |
| 82 | if (!loader) throw enoent(path); |
| 83 | const input = await readFile(join(this.root, await loader.load(options, effects)), "utf8"); |
| 84 | return parseMarkdown(input, {source: loader.path, params: loader.params, ...options}); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Returns a watcher for the page at the specified path. |
no test coverage detected