style: update markdown style.

This commit is contained in:
jaywcjlove 2021-12-05 14:25:02 +08:00
parent f1f85e9368
commit 0d1b1620db
3 changed files with 4 additions and 1047 deletions

View File

@ -204,12 +204,13 @@ function markdownToHTML(str) {
return new Promise((resolve, reject) => {
try {
const stylStr = FS.readFileSync(stylPath, 'utf8');
const stylMD = FS.readFileSync(path.resolve('node_modules/markdown-to-html-cli/github.css'), 'utf8');
stylus(stylStr.toString())
.set('filename', stylPath)
.set('compress', true)
.render((err, css) => {
if (err) throw err;
resolve(css);
resolve(`${stylMD.replace(/\n/, '')}\n${css}`);
});
} catch (err) {
reject(err);

View File

@ -29,7 +29,7 @@
"colors-cli": "1.0.28",
"ejs": "3.1.6",
"fs-extra": "10.0.0",
"markdown-to-html-cli": "3.2.3",
"markdown-to-html-cli": "3.2.4",
"sitemap-generator": "8.5.1",
"sqlite3": "5.0.2",
"stylus": "0.55.0",

File diff suppressed because it is too large Load Diff