Fix product URLs, prerender routes and links
Update routes and URL handling for product pages and improve prerender behavior. Changes include: - data/pricing.json: change summer camp URL to the canonical "/summer-camp" path. - nuxt.config.js: set prerender.failOnError = false and clean up the prerender routes list (replace old product slugs with new ones, remove duplicated entries, and consolidate gallery/news/calendar/stories routes). - pages/destinations/[id].vue: switch product links to use a productUrl helper and add mapping rules so autumn-*/winter-* IDs route to /products/autumn and /products/winter, and the summer-camp ID routes to /summer-camp. These changes align link generation with updated product routes and make prerendering more robust.
这个提交包含在:
@@ -62,7 +62,7 @@
|
||||
<NuxtLink
|
||||
v-for="p in relatedProducts"
|
||||
:key="p.id"
|
||||
:to="`/products/${p.id}`"
|
||||
:to="productUrl(p.id)"
|
||||
class="product-link"
|
||||
>
|
||||
<span class="product-name">{{ p.name }}</span>
|
||||
@@ -179,6 +179,13 @@ const relatedProducts = computed(() => (dest.value?.relatedProducts || [])
|
||||
.map(pid => allVersions.value.find(v => v.id === pid))
|
||||
.filter(Boolean)
|
||||
)
|
||||
|
||||
function productUrl(id) {
|
||||
if (id.startsWith('autumn-')) return '/products/autumn'
|
||||
if (id.startsWith('winter-')) return '/products/winter'
|
||||
if (id === 'summer-camp') return '/summer-camp'
|
||||
return `/products/${id}`
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
在新工单中引用
屏蔽一个用户