about summary refs log tree commit diff
path: root/pages/kronika/_year
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-21 20:47:41 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-21 20:47:41 +0200
commit57ab2bf2f1097ec4d4f135aecaae2754067976cf (patch)
treee68a8d205490bc7b1339d7c8b9fe0b2d644e70fe /pages/kronika/_year
parentd1c6e2eaed90891fc8e187f147af224b352662c8 (diff)
downloadpuszcza-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.vue21
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)