Skip to content

Commit 995dbe1

Browse files
committed
add sitemap route
1 parent 77f4498 commit 995dbe1

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/components/BaseHead.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const ogImageUrl = new URL(image, baseUrl);
8282
rel="sitemap"
8383
type="application/xml"
8484
title="Sitemap"
85-
href={`${SITE_URL}/sitemap-index.xml`}
85+
href={`${SITE_URL}${ROUTES.STATIC.SITEMAP}`}
8686
/>
8787

8888
{/* Open Graph / Facebook */}

src/constants/routes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const ROUTES = {
2222
STATIC: {
2323
IMAGES: '/images/',
2424
FAVICONS: '/images/favicons/',
25+
/** generated at build-time only */
26+
SITEMAP: '/sitemap-index.xml',
2527
},
2628
API: {
2729
OG_IMAGES: '/api/open-graph/',

src/libs/integrations/sitemap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ROUTES } from '../../constants/routes';
55

66
const { SITE_URL } = CONFIG;
77

8+
/** generated at build-time only */
89
export const sitemapIntegration = () =>
910
sitemap({
1011
serialize: (item) => {

0 commit comments

Comments
 (0)