Skip to content

Commit

Permalink
Update sitemap.ts
Browse files Browse the repository at this point in the history
full url in sitemap
  • Loading branch information
sherakama authored Apr 2, 2024
1 parent fab0f2d commit e88842f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {

// 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) => {
return {
url: story.path ?? `/${story.full_slug}`,
url: story.path ? `${currentURL}/${story.path}` : `${currentURL}/${story.full_slug}`,
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 e88842f

Please sign in to comment.