Skip to content

Commit

Permalink
add sitemap route
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Jul 29, 2024
1 parent 77f4498 commit 995dbe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ogImageUrl = new URL(image, baseUrl);
rel="sitemap"
type="application/xml"
title="Sitemap"
href={`${SITE_URL}/sitemap-index.xml`}
href={`${SITE_URL}${ROUTES.STATIC.SITEMAP}`}
/>

{/* Open Graph / Facebook */}
Expand Down
2 changes: 2 additions & 0 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const ROUTES = {
STATIC: {
IMAGES: '/images/',
FAVICONS: '/images/favicons/',
/** generated at build-time only */
SITEMAP: '/sitemap-index.xml',
},
API: {
OG_IMAGES: '/api/open-graph/',
Expand Down
1 change: 1 addition & 0 deletions src/libs/integrations/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ROUTES } from '../../constants/routes';

const { SITE_URL } = CONFIG;

/** generated at build-time only */
export const sitemapIntegration = () =>
sitemap({
serialize: (item) => {
Expand Down

0 comments on commit 995dbe1

Please sign in to comment.