Skip to content
Snippets Groups Projects
Commit 0a072947 authored by Marek Forster's avatar Marek Forster
Browse files

og:url fix pro generate statickych stranek

parent 2cbf6c5f
No related branches found
No related tags found
No related merge requests found
......@@ -52,12 +52,13 @@ export default {
}
},
head() {
const baseUrl = process.env.BASE_URL || 'https://www.piratipracuji.cz';
return {
title: this.posts.items[0].title,
meta: [
{ hid: 'og:title', property: 'og:title', content: this.posts.items[0].title },
{ hid: 'og:image', property: 'og:image', content: this.posts.items[0].thumbnail },
{ hid: 'og:url', property: 'og:url', content: 'https://www.piratipracuji.cz'+this.$nuxt.$route.path },
{ hid: 'og:url', property: 'og:url', content: baseUrl },
],
};
},
......
......@@ -45,6 +45,8 @@ export default {
{ hid: 'og:description', property: 'og:description', content: 'Přehled toho nejdůležitějšího nejen z Poslanecké sněmovny.' },
{ hid: 'og:site_name', property: 'og:site_name', content: appConfig.name },
{ hid: 'og:image', property: 'og:image', content: `${appConfig.productionUrl}/images/og-cover.jpg?v=3` },
{ hid: 'og:url', property: 'og:url', content: `${appConfig.productionUrl}` },
{ name: 'google-site-verification', content: appConfig.googleConsoleVerification },
],
......
This diff is collapsed.
......@@ -39,5 +39,9 @@
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-vue": "^5.1.0",
"glob": "^7.1.3"
},
"resolutions": {
"graceful-fs": "4.2.3"
}
}
......@@ -55,13 +55,14 @@ export default {
head () {
const ogImage = (this.post && this.post.thumbnail) ? { hid: 'og:image', property: 'og:image', content: `${this.post.thumbnail}` } : {};
const title = this.post ? this.post.title : 'Článek nebyl nalezen';
const baseUrl = process.env.BASE_URL || 'https://www.piratipracuji.cz';
return {
title: title,
meta: [
{ hid: 'description', property: 'description', content: this.post ? this.post.description : '' },
{ hid: 'og:description', property: 'og:description', content: this.post ? this.post.description : '' },
{ hid: 'og:title', property: 'og:title', content: title },
{ hid: 'og:url', property: 'og:url', content: 'https://www.piratipracuji.cz'+this.$nuxt.$route.path },
{ hid: 'og:url', property: 'og:url', content: baseUrl + '/' + (this.post ? this.post.slug : '') },
ogImage,
],
};
......
......@@ -17,10 +17,12 @@ export default {
Posts,
},
head() {
const baseUrl = process.env.BASE_URL || 'https://www.piratipracuji.cz';
return {
title: 'Časová osa',
meta: [
{ hid: 'og:title', property: 'og:title', content: 'Podívejte se, jak pracují Piráti!' },
{ hid: 'og:url', property: 'og:url', content: baseUrl },
],
};
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment