We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fa38f1 commit 38ccc9bCopy full SHA for 38ccc9b
packages/@vuepress/shared-utils/src/inferTitle.ts
@@ -9,12 +9,12 @@ import deeplyParseHeaders from './deeplyParseHeaders'
9
*/
10
11
export = function (frontmatter: Record<string, any>, strippedContent: string): string | void {
12
- if (frontmatter.home) {
13
- return 'Home'
14
- }
15
if (frontmatter.title) {
16
return deeplyParseHeaders(frontmatter.title)
17
}
+ if (frontmatter.home) {
+ return 'Home'
+ }
18
const match = strippedContent.trim().match(/^#+\s+(.*)/)
19
if (match) {
20
return deeplyParseHeaders(match[1])
0 commit comments