Skip to content

Commit

Permalink
style: update markdown style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 5, 2021
1 parent f1f85e9 commit 0d1b162
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1,047 deletions.
3 changes: 2 additions & 1 deletion build/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 0d1b162

Please sign in to comment.