diff options
-rw-r--r-- | pages/kronika/_year/_month/_day/_title/index.vue | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue index a64b113..27006fc 100644 --- a/pages/kronika/_year/_month/_day/_title/index.vue +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -16,6 +16,27 @@ import frontmatter from 'front-matter' import k from '~/api' export default { + head() { + return { + meta: [ + { + hid: 'og:title', + name: 'og:title', + content: this.attributes.title + }, + { + hid: 'og:type', + name: 'og:type', + content: 'article' + }, + { + hid: 'og:article:author', + name: 'og:article:author', + content: this.attributes.author + } + ] + } + }, async asyncData({ params }) { const { year, month, day, title } = params const post = k.getPost(year, month, day, title) |