Files
2025-02-Compiler/build.js
2025-10-03 19:17:46 +09:00

28 lines
730 B
JavaScript

const { Notebook } = require("crossnote");
const path = require("path");
const fs = require("fs");
async function main() {
const notebook = await Notebook.init(
{
notebookPath: path.resolve(''),
config: {
previewTheme: 'github-light.css',
mathRenderingOption: 'KaTeX',
codeBlockTheme: 'github.css',
printBackground: true,
enableScriptExecution: true,
chromePath: '/usr/bin/google-chrome-stable',
},
}
);
const file = "./src/2024062806.md";
const engine = notebook.getNoteMarkdownEngine(file);
await engine.chromeExport( {runAllCodeChunks: true});
}
main();