Skip to content

Commit 70c3521

Browse files
authored
Add meta:description tag for better SEO (#77)
1 parent 9ffabff commit 70c3521

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

extensions/opengraph/opengraph.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ func opengraphTags(p Page) template.HTML {
8686
escape(title),
8787
)
8888

89-
return template.HTML(ogTags + twitterTags)
89+
metaTags := fmt.Sprintf(`
90+
<meta name="description" content="%s">
91+
`,
92+
escape(firstParagraph),
93+
)
94+
95+
return template.HTML(ogTags + twitterTags + metaTags)
9096
}
9197

9298
func rawText(source []byte, n ast.Node, limit int) string {

0 commit comments

Comments
 (0)