feat(open_graph): add article:author

This commit is contained in:
curben 2019-10-18 02:10:57 +01:00
parent b545b38c1e
commit 1b6841e9ef
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,8 @@ function openGraphHelper () {
const { config, page, theme } = this
const { content } = page
let images = page.photos || []
let description = page.excerpt || theme.description || false
const description = page.excerpt || theme.description || false
const author = config.author
const keywords = page.tags || false
const title = page.title || theme.nickname
const type = (this.is_post() ? 'article' : 'website')
@ -70,6 +71,8 @@ function openGraphHelper () {
result += meta('description', description)
}
result += og('article:author', author)
if (keywords) {
keywords.forEach(tag => {
result += og('article:tag', tag.name)