diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-01-25 19:59:54 +0100 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-01-25 19:59:54 +0100 |
commit | 0df2c534d8615fd55994e9d27d9c2b81d4e87c20 (patch) | |
tree | 2ccad4ba35b27a09661ec489b8ad4db7eda7ab8f | |
parent | 1aa3a88b21539aa06572d86324673baeddfbe46f (diff) | |
download | puszcza-0df2c534d8615fd55994e9d27d9c2b81d4e87c20.tar.gz puszcza-0df2c534d8615fd55994e9d27d9c2b81d4e87c20.zip |
Add image to open graph
-rw-r--r-- | pages/kronika/_year/_month/_day/_title/index.vue | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue index 9fab1d0..ed9eab7 100644 --- a/pages/kronika/_year/_month/_day/_title/index.vue +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -5,6 +5,11 @@ <p>Nie znaleziono wpisu</p> </div> <section v-else class="article"> + <img + :src="attributes.image" + :alt="attributes.title" + :title="attributes.title" + /> <article class="content" v-html="content"></article> </section> </div> @@ -22,19 +27,24 @@ export default { { hid: 'og:title', property: 'og:title', - content: this.attributes.title + content: this.attributes.title, }, { hid: 'og:type', property: 'og:type', - content: 'article' + content: 'article', }, { hid: 'og:article:author', property: 'og:article:author', - content: this.attributes.author - } - ] + content: this.attributes.author, + }, + { + hid: 'og:image', + property: 'og:image', + content: this.attributes.image, + }, + ], } }, async asyncData({ params }) { @@ -46,14 +56,14 @@ export default { return { params, attributes: post.content.meta, - content: post.content.html + content: post.content.html, } }, data() { return { - notFound: false + notFound: false, } - } + }, } </script> |