Skip to content

Commit

Permalink
docs(plugin-blog): fix missing title in getInfo option (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
pprzetacznik authored Jan 15, 2025
1 parent 2ee49d3 commit 3ff6fc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/plugins/blog/blog/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export default {
return true
},

getInfo: ({ frontmatter, git = {}, data = {} }) => {
getInfo: ({ frontmatter, title, git = {}, data = {} }) => {
// getting page info
const info: Record<string, unknown> = {
title,
author: frontmatter.author || '',
categories: frontmatter.categories || [],
date: frontmatter.date || git.createdTime || null,
Expand Down
3 changes: 2 additions & 1 deletion docs/zh/plugins/blog/blog/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ export default {
return true
},

getInfo: ({ frontmatter, git = {}, data = {} }) => {
getInfo: ({ frontmatter, title, git = {}, data = {} }) => {
// 获取页面信息
const info: Record<string, unknown> = {
title,
author: frontmatter.author || '',
categories: frontmatter.categories || [],
date: frontmatter.date || git.createdTime || null,
Expand Down

0 comments on commit 3ff6fc4

Please sign in to comment.