Skip to content

Commit 6ff343c

Browse files
committed
默认生成html
1 parent cc526fa commit 6ff343c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
/test
55
/3th
66
/.idea
7+
/.vscode
78

89
/npm-debug.log
9-
10+
/output
1011
/publish

lib/generate.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ function generate(filepath, outputDir, rDir) {
7171
title = filename;
7272
}
7373

74-
var url = filename.replace(/\.(?:md|markdown)$/i, '.htm');
74+
var url = filename.replace(/\.(?:md|markdown)$/i, '.html');
7575
indexList += '<li><a class="star" href="' + url + '" target="_blank">' + title + '</a> &nbsp; [<a href="' + url + '?_multiscreen=1" target="_blank" title="多窗口打开">多窗口</a>]</li>';
7676

7777
copyLinkToOutput(content, filepath, outputDir, rDir);
7878
html = handlerHTML(html, rDir);
79-
$.writeFile(path.join(outputDir, filename.replace(/\.(?:md|markdown)$/i, '.htm')), html);
79+
$.writeFile(path.join(outputDir, filename.replace(/\.(?:md|markdown)$/i, '.html')), html);
8080
}
8181
return false;
8282
}
@@ -109,7 +109,7 @@ function generate(filepath, outputDir, rDir) {
109109
});
110110
if (html) {
111111
html = handlerHTML(html, rDir);
112-
$.writeFile(path.join(outputDir, filename.replace(/\.(?:md|markdown)$/i, '.htm')), html);
112+
$.writeFile(path.join(outputDir, filename.replace(/\.(?:md|markdown)$/i, '.html')), html);
113113
}
114114
}
115115
}

0 commit comments

Comments
 (0)