diff --git a/lib/hexo/post.js b/lib/hexo/post.js index 964cf56cda..37d3f5f676 100644 --- a/lib/hexo/post.js +++ b/lib/hexo/post.js @@ -135,10 +135,8 @@ class Post { const { tag } = this.context.extend; const scaffold = await this._getScaffold(data.layout); - let frontMatter = prepareFrontMatter({...data}); const yfmSplit = yfm.split(scaffold); - - frontMatter = await tag.render(yfmSplit.data, frontMatter); + const frontMatter = await tag.render(yfmSplit.data, prepareFrontMatter({...data})); const { separator } = yfmSplit; const jsonMode = separator[0] === ';';