Skip to content

Commit

Permalink
Right trim slash
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama authored Apr 3, 2024
1 parent e88842f commit 5157a44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
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 ? `${currentURL}/${story.path}` : `${currentURL}/${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
Expand Down

0 comments on commit 5157a44

Please sign in to comment.