mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Add custom intro page by fetching markdown content from a file (#697)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
4b2e2a7c93
commit
7f6e0e53a7
31 changed files with 373 additions and 173 deletions
|
@ -29,7 +29,7 @@ export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
|
|||
private passYamlErrorState: (error: boolean) => void,
|
||||
private onRawMeta: (rawMeta: RawNoteFrontmatter) => void,
|
||||
private onToc: (toc: TocAst) => void,
|
||||
private onLineMarkers: (lineMarkers: LineMarkers[]) => void
|
||||
private onLineMarkers?: (lineMarkers: LineMarkers[]) => void
|
||||
) {
|
||||
super()
|
||||
}
|
||||
|
@ -58,8 +58,12 @@ export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
|
|||
AsciinemaReplacer.markdownItPlugin,
|
||||
highlightedCode,
|
||||
quoteExtra,
|
||||
(markdownIt) => documentToc(markdownIt, this.onToc),
|
||||
(markdownIt) => lineNumberMarker(markdownIt, (lineMarkers) => this.onLineMarkers(lineMarkers))
|
||||
)
|
||||
(markdownIt) => documentToc(markdownIt, this.onToc))
|
||||
if (this.onLineMarkers) {
|
||||
const callback = this.onLineMarkers
|
||||
this.configurations.push(
|
||||
(markdownIt) => lineNumberMarker(markdownIt, (lineMarkers) => callback(lineMarkers))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue