Skip to content

docs(en/sitemap.mdx): describe customSitemaps #11563

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

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

Conversation

gouravkhunger
Copy link

Description (required)

Add docs for the new customSitemaps option in the @astrojs/sitemap integration.

Related issues & labels (optional)

First-time contributor to Astro Docs?

Yes, discord: @gouravkhunger

Copy link

netlify bot commented Apr 29, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 72f8718
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/6883eac1433f1c0008d2036e
😎 Deploy Preview https://deploy-preview-11563--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Apr 29, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/integrations-guide/sitemap.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@astrobot-houston
Copy link
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳.

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Apr 29, 2025
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
page !== 'https://example.com/secret-vip-lounge-1/' &&
page !== 'https://example.com/secret-vip-lounge-2/' &&
page !== 'https://example.com/secret-vip-lounge-3/' &&
page !== 'https://example.com/secret-vip-lounge-4/',
}),
],
});
```

### customPages
Copy link
Member

Choose a reason for hiding this comment

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

Noting that this content is NOT part of the attached feature PR, but since the new entry was modelled on it, and I didn't exactly love the old one, I've updated both together to match a preferred structure.

Bonus points: if anyone can find when customPages was added, it would be amazing (but not necessary!) to include the since/version for that entry, too.

Copy link
Member

Choose a reason for hiding this comment

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

I found the implementation PR (withastro/astro#3315) but it seems changesets wasn't a thing yet, it's from 2022.

I looked at changelogs (both in sitemap and core) and I can't find anything. It seems it predates Astro v1.0.0! In CHANGELOG-v1.md the oldest PR is around 4225 (while the implementation is 3315). And looking at PRs number in the sitemap changelog, it seems this was implemented around the v0.1.0 of the integration! (4225 is the first PR in 1.0.2 and there is no PR number before that).

So maybe it's fine to omit Since for customPages? 😅

Copy link
Member

Choose a reason for hiding this comment

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

Excellent, thank you for hunting! Yes, our typical M.O. is to only put things that were introduced after v1, so it's fine!

Copy link
Member

Choose a reason for hiding this comment

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

Rereading what I wrote, I noticed I mixed up the numbers between the tabs... 😅 In the sitemap changelog, the implementation PR should be between 0.0.2 and 0.1.1. But the outcomes seem the same, it's old and predates Astro v1!

page !== 'https://example.com/secret-vip-lounge-1/' &&
page !== 'https://example.com/secret-vip-lounge-2/' &&
page !== 'https://example.com/secret-vip-lounge-3/' &&
page !== 'https://example.com/secret-vip-lounge-4/',
}),
],
});
```

### customPages
Copy link
Member

Choose a reason for hiding this comment

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

I found the implementation PR (withastro/astro#3315) but it seems changesets wasn't a thing yet, it's from 2022.

I looked at changelogs (both in sitemap and core) and I can't find anything. It seems it predates Astro v1.0.0! In CHANGELOG-v1.md the oldest PR is around 4225 (while the implementation is 3315). And looking at PRs number in the sitemap changelog, it seems this was implemented around the v0.1.0 of the integration! (4225 is the first PR in 1.0.2 and there is no PR number before that).

So maybe it's fine to omit Since for customPages? 😅

<Since v="3.5.0" pkg="@astrojs/sitemap" />
</p>

An array of externally sitemaps to be included in the `sitemap-index.xml` file along with the generated sitemap entries.
Copy link
Member

Choose a reason for hiding this comment

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

Not a native speaker but externally seems odd here... Should this be external or externally-generated?

Copy link
Author

Choose a reason for hiding this comment

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

I believe it was supposed to be externally-generated as used in customPages above :)

Copy link
Member

Choose a reason for hiding this comment

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

Haha, yes, there was some copy/pasting of non-identical things going on here. Thanks for catching!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants