Skip to content

Commit

Permalink
Render myst to html
Browse files Browse the repository at this point in the history
  • Loading branch information
irskep committed Sep 10, 2024
1 parent 6652a12 commit e26045c
Show file tree
Hide file tree
Showing 3 changed files with 557 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"mermaid": "^11.1.1",
"micromatch": "^4.0.8",
"myst-parser": "^1.5.6",
"myst-to-html": "^1.5.6",
"nunjucks": "^3.2.4",
"parse5": "^7.1.2",
"shiki": "^1.14.1"
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/htmlRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
writeFile,
} from "../utils/pathUtils.js";
import { LogCollector } from "../utils/logUtils.js";
import { mystToHtml } from "myst-to-html";

export class HTMLRenderer implements DjockeyRenderer {
identifier: DjockeyOutputFormat = "html";
Expand Down Expand Up @@ -179,8 +180,7 @@ export class HTMLRenderer implements DjockeyRenderer {
renderedDocs[k] = postprocessedHTML;
break;
case "mdast":
renderedDocs[k] = ""; // TODO
// renderedDocs[k] = new MyST().renderMdast(doc.docs[k].value);
renderedDocs[k] = mystToHtml(doc.docs[k].value);
break;
}
}
Expand Down
Loading

0 comments on commit e26045c

Please sign in to comment.