Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add sitemap #87

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Feat: Add sitemap #87

wants to merge 6 commits into from

Conversation

luukbrauckmann
Copy link
Member

@luukbrauckmann luukbrauckmann commented Feb 5, 2025

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

Copy link

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

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

@luukbrauckmann luukbrauckmann marked this pull request as ready for review February 5, 2025 14:53
Copy link
Contributor

@sjoerdbeentjes sjoerdbeentjes left a comment

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.

import { datocmsCollection } from '@lib/datocms';
import type { APIRoute } from 'astro';

export const prerender = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

>
<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
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