Skip to content

Feat: Add sitemap#87

Open
slimluccii wants to merge 6 commits into
mainfrom
feat/add-sitemap
Open

Feat: Add sitemap#87
slimluccii wants to merge 6 commits into
mainfrom
feat/add-sitemap

Conversation

@slimluccii

@slimluccii slimluccii commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

Changes

  • Add custom sitemap

How to test

  1. Open preview link
  2. Navigate to /sitemap.xml

Checklist

  • I have performed a self-review of my own code
  • I have made sure that my PR is easy to review (not too big, includes comments)
  • I have made updated relevant documentation files (in project README, docs/, etc)
  • I have added a decision log entry if the change affects the architecture or changes a significant technology
  • I have notified a reviewer

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 5, 2025

Copy link
Copy Markdown

Deploying dda-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: f0c0695
Status: ✅  Deploy successful!
Preview URL: https://88ea7078.dda-website.pages.dev
Branch Preview URL: https://feat-add-sitemap.dda-website.pages.dev

View logs

@slimluccii slimluccii marked this pull request as ready for review February 5, 2025 14:53

@sjoerdbeentjes sjoerdbeentjes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One small comment.

Comment thread src/pages/sitemap.xml.ts Outdated
import { datocmsCollection } from '@lib/datocms';
import type { APIRoute } from 'astro';

export const prerender = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread src/pages/sitemap.xml.ts Outdated
>
<url><loc>${site}</loc></url>
<url><loc>${site}events/</loc></url>
${events.map((event) => `<url><loc>${site}events/${event.details.slug}</loc></url>`).join('\n') }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a function like generateUrlTags, since there's some repetition below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants