Identifies level 1 headings and selects everything as text for it.
This commit is contained in:
3
build.js
3
build.js
@@ -1,4 +1,5 @@
|
||||
import * as fs from "fs";
|
||||
import { toHtml } from "./markdown.js"
|
||||
|
||||
const paths = {
|
||||
output: ".dist",
|
||||
@@ -36,7 +37,7 @@ manifest.forEach((m) => {
|
||||
let htmlTemplate = fs.readFileSync(notePath, {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
htmlTemplate = htmlTemplate.replace("{{markdown}}", m.markdown);
|
||||
htmlTemplate = htmlTemplate.replace("{{markdown}}", toHtml(m.markdown));
|
||||
fs.writeFileSync(`${paths.output}/${m.directoryName}.html`, htmlTemplate, {
|
||||
encoding: "utf-8",
|
||||
flag: "ax",
|
||||
|
||||
Reference in New Issue
Block a user