From 255ea82f9204c445573ce03dd9c680914df2586f Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 9 Sep 2022 11:25:23 +0800 Subject: [PATCH] fix(#1099): hexo server error when changing the config --- lib/plugins/processor/post.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/plugins/processor/post.js b/lib/plugins/processor/post.js index 4fa46e5d18..35bc5d7720 100644 --- a/lib/plugins/processor/post.js +++ b/lib/plugins/processor/post.js @@ -206,7 +206,12 @@ function parseFilename(config, path) { const data = permalink.parse(path); if (data) { - return data; + if (data.title !== undefined) { + return data; + } + return Object.assign(data, { + title: slugize(path) + }); } return {