From c01fffdc0e4ca6b2cf18777b16d430e2accb0659 Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Tue, 4 Jun 2024 12:11:06 +0100 Subject: [PATCH 1/5] chore: Refactor Filters.vue to use template tag for attribute loop --- woonuxt_base/components/filtering/Filters.vue | 4 ++-- woonuxt_base/nuxt.config.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/woonuxt_base/components/filtering/Filters.vue b/woonuxt_base/components/filtering/Filters.vue index 21dc79e7..9d6b7215 100644 --- a/woonuxt_base/components/filtering/Filters.vue +++ b/woonuxt_base/components/filtering/Filters.vue @@ -14,7 +14,7 @@ const { hideCategories } = defineProps({ hideCategories: { type: Boolean, defaul
-
+ diff --git a/woonuxt_base/nuxt.config.ts b/woonuxt_base/nuxt.config.ts index c78d2e2a..a140181a 100644 --- a/woonuxt_base/nuxt.config.ts +++ b/woonuxt_base/nuxt.config.ts @@ -47,6 +47,8 @@ export default defineNuxtConfig({ nitro: { routeRules: { '/': { prerender: true }, + '/**': { prerender: true }, + '/products': { swr: true }, '/products/**': { swr: 3600 }, '/checkout/order-received/**': { ssr: false }, '/order-summary/**': { ssr: false }, From 97d985f1020637b6a156176b72e38f6f276a15a8 Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Tue, 4 Jun 2024 12:20:55 +0100 Subject: [PATCH 2/5] chore: Update build command to "nuxt build" in netlify.toml --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 36c1f95a..8b47236e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ NUXT_IMAGE_DOMAINS = "Comma separated list of domains. example.com,example2.com" [build] - command = "nuxt generate" + command = "nuxt build" [images] remote_images = ["https://secure.woonuxt.com/.*"] From 0a6f87ec73ad5bf01ffa3a1d828541aaf20f9ebe Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Tue, 4 Jun 2024 12:57:10 +0100 Subject: [PATCH 3/5] chore: Update SWR cache duration for /products route --- woonuxt_base/nuxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woonuxt_base/nuxt.config.ts b/woonuxt_base/nuxt.config.ts index a140181a..d7bfddf3 100644 --- a/woonuxt_base/nuxt.config.ts +++ b/woonuxt_base/nuxt.config.ts @@ -48,7 +48,7 @@ export default defineNuxtConfig({ routeRules: { '/': { prerender: true }, '/**': { prerender: true }, - '/products': { swr: true }, + '/products': { swr: 3600 }, '/products/**': { swr: 3600 }, '/checkout/order-received/**': { ssr: false }, '/order-summary/**': { ssr: false }, From a01d214d9afeeb670172d1a37b73c006d52385a0 Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Tue, 4 Jun 2024 13:01:19 +0100 Subject: [PATCH 4/5] chore: Refactor Filters.vue to use template tag for attribute loop --- woonuxt_base/components/filtering/Filters.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/woonuxt_base/components/filtering/Filters.vue b/woonuxt_base/components/filtering/Filters.vue index 9d6b7215..21dc79e7 100644 --- a/woonuxt_base/components/filtering/Filters.vue +++ b/woonuxt_base/components/filtering/Filters.vue @@ -14,7 +14,7 @@ const { hideCategories } = defineProps({ hideCategories: { type: Boolean, defaul
- +
From 5e97f9532d0bd108b06f229773ddd7073120c54e Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Sat, 13 Jul 2024 20:12:25 +0100 Subject: [PATCH 5/5] feat: Add sizes to CategorCard image --- woonuxt_base/app/components/CategoryCard.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/woonuxt_base/app/components/CategoryCard.vue b/woonuxt_base/app/components/CategoryCard.vue index aebaf0b3..eb870b2b 100644 --- a/woonuxt_base/app/components/CategoryCard.vue +++ b/woonuxt_base/app/components/CategoryCard.vue @@ -22,6 +22,7 @@ const ImageHeight = Math.round(imageWidth * 1.25); :alt="node.image?.altText || node.name" :title="node.image?.title || node.name" :loading="imageLoading" + :sizes="`50vw md:${imageWidth}px`" placeholder placeholder-class="blur-xl" />