From 3ff6fc4d074a88d418baba4d6efef3b5006323ae Mon Sep 17 00:00:00 2001 From: Piotr Przetacznik Date: Wed, 15 Jan 2025 11:28:29 +0100 Subject: [PATCH] docs(plugin-blog): fix missing title in getInfo option (#340) --- docs/plugins/blog/blog/guide.md | 3 ++- docs/zh/plugins/blog/blog/guide.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/plugins/blog/blog/guide.md b/docs/plugins/blog/blog/guide.md index 64ca24943f..aca0e3a169 100644 --- a/docs/plugins/blog/blog/guide.md +++ b/docs/plugins/blog/blog/guide.md @@ -44,9 +44,10 @@ export default { return true }, - getInfo: ({ frontmatter, git = {}, data = {} }) => { + getInfo: ({ frontmatter, title, git = {}, data = {} }) => { // getting page info const info: Record = { + title, author: frontmatter.author || '', categories: frontmatter.categories || [], date: frontmatter.date || git.createdTime || null, diff --git a/docs/zh/plugins/blog/blog/guide.md b/docs/zh/plugins/blog/blog/guide.md index 92843c2164..cf2afe9416 100644 --- a/docs/zh/plugins/blog/blog/guide.md +++ b/docs/zh/plugins/blog/blog/guide.md @@ -40,9 +40,10 @@ export default { return true }, - getInfo: ({ frontmatter, git = {}, data = {} }) => { + getInfo: ({ frontmatter, title, git = {}, data = {} }) => { // 获取页面信息 const info: Record = { + title, author: frontmatter.author || '', categories: frontmatter.categories || [], date: frontmatter.date || git.createdTime || null,