28 lines
730 B
JavaScript
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(); |