diff options
Diffstat (limited to 'pages/kronika')
-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..fa9a9ab 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', + property: 'og:title', + content: this.attributes.title + }, + { + hid: 'og:type', + property: 'og:type', + content: 'article' + }, + { + hid: 'og:article:author', + property: 'og:article:author', + content: this.attributes.author + } + ] + } + }, async asyncData({ params }) { const { year, month, day, title } = params const post = k.getPost(year, month, day, title) |