Skip to content

Commit 869eb8d

Browse files
authoredMay 28, 2020
fix($shared-utils): use title variable for homepage (fix #2247) (#2307)
1 parent 54b84b3 commit 869eb8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎packages/@vuepress/shared-utils/src/inferTitle.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import deeplyParseHeaders from './deeplyParseHeaders'
99
*/
1010

1111
export = function (frontmatter: Record<string, any>, strippedContent: string): string | void {
12-
if (frontmatter.home) {
13-
return 'Home'
14-
}
1512
if (frontmatter.title) {
1613
return deeplyParseHeaders(frontmatter.title)
1714
}
15+
if (frontmatter.home) {
16+
return 'Home'
17+
}
1818
const match = strippedContent.trim().match(/^#+\s+(.*)/)
1919
if (match) {
2020
return deeplyParseHeaders(match[1])

0 commit comments

Comments
 (0)
Please sign in to comment.