website: Support math formula display. (#21)
This commit is contained in:
@ -33,7 +33,10 @@ export async function createHTML(files = [], num = 0) {
|
||||
isHome: /README.md$/.test(path.relative(process.cwd(), dataFile.path)),
|
||||
githubURL,
|
||||
homePath: path.relative(path.dirname(outputHTMLPath), path.resolve(OUTOUT, 'index.html')),
|
||||
css: [path.relative(path.dirname(outputHTMLPath), CSS_OUTPUT_PATH)],
|
||||
css: [
|
||||
path.relative(path.dirname(outputHTMLPath), path.resolve(OUTOUT, 'style/style.css')),
|
||||
path.relative(path.dirname(outputHTMLPath), path.resolve(OUTOUT, 'style/katex.css')),
|
||||
],
|
||||
});
|
||||
await fs.writeFile(outputHTMLPath, html);
|
||||
console.log(`♻️ \x1b[32;1m ${path.relative(OUTOUT, outputHTMLPath)} \x1b[0m`);
|
||||
@ -44,7 +47,8 @@ export async function run() {
|
||||
await fs.ensureDir(OUTOUT);
|
||||
await fs.emptyDir(OUTOUT);
|
||||
await fs.ensureDir(path.dirname(CSS_OUTPUT_PATH));
|
||||
await fs.copyFile(CSSPATH, CSS_OUTPUT_PATH);
|
||||
await fs.copy(path.resolve(process.cwd(), 'scripts/style'), path.resolve(OUTOUT, 'style'));
|
||||
// await fs.copyFile(CSSPATH, CSS_OUTPUT_PATH);
|
||||
const files = await recursiveReaddirFiles(process.cwd(), {
|
||||
ignored: /\/(node_modules|\.git)/,
|
||||
exclude: /(\.json|\.mjs|CONTRIBUTING\.md)$/,
|
||||
|
Reference in New Issue
Block a user