|
@@ -287,6 +287,7 @@ function writeMd() {
|
|
|
content: mdContent,
|
|
|
url: editTarget,
|
|
|
};
|
|
|
+
|
|
|
axios
|
|
|
.post(contentApiUrl + editTarget, (json = postData))
|
|
|
.then(({ data }) => {});
|
|
@@ -630,7 +631,14 @@ function GetMdHeader(result = []) {
|
|
|
rContent += 'meta_description: "' + $("#cmetadsc").val() + '"\n';
|
|
|
rContent += 'title: "' + $("#ctitle").val() + '"\n';
|
|
|
rContent += "date: " + $("#cdate").val() + "\n";
|
|
|
- rContent += "draft: " + $("#cdraft").is(":checked") + "\n";
|
|
|
+ // rContent += "draft: " + !$("#cdraft").is(":checked") + "\n";
|
|
|
+
|
|
|
+ // 點擊編輯完成後勾選顯示
|
|
|
+ if (result === "editorSave" || result !== []) {
|
|
|
+ rContent += "draft: " + false + "\n";
|
|
|
+ } else {
|
|
|
+ rContent += "draft: " + !$("#cdraft").is(":checked") + "\n";
|
|
|
+ }
|
|
|
|
|
|
if ($("#ctype").val() == "news") {
|
|
|
rContent += 'display: ' + $("#cdisplay").is(":checked") + '\n';
|