From 787a490ece1b5f4283d0fede91938cb7b83e3811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B0=8F=E6=98=8E?= <2966980@qq.com> Date: Tue, 22 Nov 2022 05:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=97=B6=20Front-matter=20=E5=89=8D=E9=9D=A2?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=20---?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: Missing "---" in front of Front-matter when updating posts --- update.js | 1 + 1 file changed, 1 insertion(+) diff --git a/update.js b/update.js index 47ebdd90..7ca4a063 100644 --- a/update.js +++ b/update.js @@ -70,6 +70,7 @@ module.exports = function (model, id, update, callback, hexo) { post.save(function () { // console.log(post.full_source, post.source) + raw = '---\n' + raw; fs.writeFile(full_source, raw, function(err){ if (err) return callback(err);