Skip to content

Commit

Permalink
Merge pull request #88 from thegalactiks/exclude-canonical-sitemap
Browse files Browse the repository at this point in the history
Exclude canonical sitemap
  • Loading branch information
emmanuelgautier authored Oct 25, 2023
2 parents e0c847c + 34eafaf commit d1f9c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/adapters/astro/src/preset.mts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const integrationsPreset = (): AstroIntegration[] => [
serialize: async (item) => {
const page = await getPageByURL(item.url);
if (!page) {
return item;
return undefined;
}

return ({
Expand All @@ -32,7 +32,7 @@ export const integrationsPreset = (): AstroIntegration[] => [
news: page.type === 'Article' && {
publication: {
name: getConfig().webManifest.name,
language: getDefaultLanguage(),
language: (page.inLanguage && getDefaultLanguage())?.substring(0, 2).toLowerCase(),
},

publication_date: isValid(page.datePublished) ? page.datePublished.toISOString() : undefined,
Expand Down

0 comments on commit d1f9c9b

Please sign in to comment.