From 21b3d762e51e6225222372a347a1e8b0d8fa7897 Mon Sep 17 00:00:00 2001 From: Sherakama Date: Wed, 3 Apr 2024 10:00:00 -0700 Subject: [PATCH 1/2] Update sitemap.ts (#257) * Update sitemap.ts full url in sitemap * Right trim slash --- app/sitemap.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index f6af812b..0221f004 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -21,10 +21,12 @@ export default async function sitemap(): Promise { // Exclude any stories with noindex set to true on Storyblok const indexStories = response.filter((story) => !story.content?.noindex); - + const currentURL = process.env.URL || process.env.DEPLOY_PRIME_URL || 'https://momentum.stanford.edu'; + const ret = indexStories.map((story) => { + const url = story.path ? `${currentURL}/${story.path}` : `${currentURL}/${story.full_slug}`; return { - url: story.path ?? `/${story.full_slug}`, + url: url.replace(/\/+$/, ''), lastModified: new Date(story.published_at), changeFrequency: 'daily', // Added in 13.4.5 priority: 0.5, // Added in 13.4.5 From e400bbc903a04895dc3de2c37a5672f49909d1b0 Mon Sep 17 00:00:00 2001 From: Github Action Date: Wed, 3 Apr 2024 20:30:09 +0000 Subject: [PATCH 2/2] 1.3.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b659b37..fe280225 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ood-giving-campaign", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ood-giving-campaign", - "version": "1.3.3", + "version": "1.3.4", "dependencies": { "@heroicons/react": "^2.1.1", "@storyblok/react": "^3.0.8", diff --git a/package.json b/package.json index 76f56a61..553efa42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ood-giving-campaign", - "version": "1.3.3", + "version": "1.3.4", "description": "Momentum", "author": "Stanford University", "keywords": [