diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-21 20:47:41 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-21 20:47:41 +0200 |
commit | 57ab2bf2f1097ec4d4f135aecaae2754067976cf (patch) | |
tree | e68a8d205490bc7b1339d7c8b9fe0b2d644e70fe /pages/kronika/_year | |
parent | d1c6e2eaed90891fc8e187f147af224b352662c8 (diff) | |
download | puszcza-57ab2bf2f1097ec4d4f135aecaae2754067976cf.tar.gz puszcza-57ab2bf2f1097ec4d4f135aecaae2754067976cf.zip |
Add opengraph meta tags
Diffstat (limited to 'pages/kronika/_year')
-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) |