Skip to content

Commit

Permalink
fix($shared-utils): use title variable for homepage (fix vuejs#2247)
Browse files Browse the repository at this point in the history
  • Loading branch information
alizadeh118 committed Apr 14, 2020
1 parent 8562a4f commit 5460668
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@vuepress/shared-utils/src/inferTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import deeplyParseHeaders from './deeplyParseHeaders'
export = function (frontmatter: Record<string, any>, strippedContent: string): string | void {
if (frontmatter.title) {
return deeplyParseHeaders(frontmatter.title)
} else if (frontmatter.home) {
}
if (frontmatter.home) {
return 'Home'
}
const match = strippedContent.trim().match(/^#+\s+(.*)/)
Expand Down

0 comments on commit 5460668

Please sign in to comment.