diff --git a/nuxt.config.js b/nuxt.config.js index 735841e..2225a1f 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -109,6 +109,7 @@ export default { const productRoutes = response.data.data.products.edges const CollectionRoutes = response.data.data.collections.edges blogRoutes.forEach((blog) => { + res.push('/blog/' + blog.node.handle) blog.node.articles.edges.forEach((article) => { res.push('/blog/' + blog.node.handle + '/article/' + article.node.handle) }) diff --git a/pages/blog/_handle/article/_articleHandle/index.vue b/pages/blog/_handle/article/_articleHandle/index.vue index c0cd9c3..71b3fb1 100644 --- a/pages/blog/_handle/article/_articleHandle/index.vue +++ b/pages/blog/_handle/article/_articleHandle/index.vue @@ -50,6 +50,10 @@ export default { authorV2 { name }, + seo { + title, + description + } image (maxWidth: 2000) { altText, originalSrc @@ -63,6 +67,14 @@ export default { article: response.data.data.blogByHandle.articleByHandle } }) + }, + head () { + return { + title: this.article.seo.title, + meta: [ + { hid: 'description', name: 'description', content: this.article.seo.description } + ] + } } } diff --git a/pages/blog/_handle/index.vue b/pages/blog/_handle/index.vue index 6593df3..979109b 100644 --- a/pages/blog/_handle/index.vue +++ b/pages/blog/_handle/index.vue @@ -54,6 +54,11 @@ export default { blog: response.data.data.blogByHandle } }) + }, + head () { + return { + title: this.$store.state.shop.name + ' | ' + this.blog.title + } } } diff --git a/pages/index.vue b/pages/index.vue index caae0a4..97da292 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -90,7 +90,7 @@ export default { }, head () { return { - title: 'Home Page', + title: this.shop.name, meta: [ { hid: 'description', name: 'description', content: this.description } ] diff --git a/pages/policy/privacy-policy/index.vue b/pages/policy/privacy-policy/index.vue index 7102531..d6be114 100644 --- a/pages/policy/privacy-policy/index.vue +++ b/pages/policy/privacy-policy/index.vue @@ -31,6 +31,11 @@ export default { policy: response.data.data.shop.privacyPolicy } }) + }, + head () { + return { + title: 'Privacy Policy' + } } } diff --git a/pages/policy/refund-policy/index.vue b/pages/policy/refund-policy/index.vue index 033fcd2..3fecc48 100644 --- a/pages/policy/refund-policy/index.vue +++ b/pages/policy/refund-policy/index.vue @@ -31,6 +31,11 @@ export default { policy: response.data.data.shop.refundPolicy } }) + }, + head () { + return { + title: 'Refund Policy' + } } } diff --git a/pages/policy/terms-of-service/index.vue b/pages/policy/terms-of-service/index.vue index 03f53c7..e8ab3df 100644 --- a/pages/policy/terms-of-service/index.vue +++ b/pages/policy/terms-of-service/index.vue @@ -31,6 +31,11 @@ export default { policy: response.data.data.shop.termsOfService } }) + }, + head () { + return { + title: 'Terms of services' + } } } diff --git a/pages/products/_handle/index.vue b/pages/products/_handle/index.vue index 0003513..0579355 100644 --- a/pages/products/_handle/index.vue +++ b/pages/products/_handle/index.vue @@ -94,6 +94,14 @@ export default { product: {}, quantity: 1 } + }, + head () { + return { + title: this.$store.state.shop.name + ' | ' + this.product.title, + meta: [ + { hid: 'description', name: 'description', content: this.product.description } + ] + } } } diff --git a/pages/products/index.vue b/pages/products/index.vue index 74a2fea..7c039ec 100644 --- a/pages/products/index.vue +++ b/pages/products/index.vue @@ -26,6 +26,11 @@ export default { products () { return this.$store.state.products } + }, + head () { + return { + title: this.$store.state.shop.name + ' | ' + 'Products' + } } }