Tighten social metadata generation
This commit is contained in:
parent
bbdc45eca3
commit
bc3cf9691f
5 changed files with 57 additions and 8 deletions
|
|
@ -63,7 +63,11 @@ function getFirstMarkdownHeading(root: MdRoot): string | undefined {
|
|||
return toString(node).trim().length > 0
|
||||
})
|
||||
|
||||
if (!firstMeaningfulNode || firstMeaningfulNode.type !== "heading") {
|
||||
if (
|
||||
!firstMeaningfulNode ||
|
||||
firstMeaningfulNode.type !== "heading" ||
|
||||
firstMeaningfulNode.depth !== 1
|
||||
) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue