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

lastmod of SitemapItem object is not String type #10355

Open
tkskto opened this issue Dec 13, 2024 · 2 comments
Open

lastmod of SitemapItem object is not String type #10355

tkskto opened this issue Dec 13, 2024 · 2 comments
Labels
good first issue Good for newcomers help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)

Comments

@tkskto
Copy link

tkskto commented Dec 13, 2024

📚 Subject area/topic

Integrations

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/ja/guides/integrations-guide/sitemap/#serialize

📋 Description of content that is out-of-date or incorrect

The documentation states that lastmod is:

lastmod (ISO formatted date, String type)

However, upon inspecting the implementation code, lastmod is being handled as a Date type.

However since this Date type is based on Universal Time (UTC), it's not possible to directly specify the lastmod in a specific timezone (e.g., Japan Standard Time (JST)) using a string representation. It is my view that the implementation could be changed to consider the possibility of allowing the String type to be specified.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@tkskto tkskto added the improve documentation Enhance existing documentation (e.g. add an example, improve description) label Dec 13, 2024
@sarah11918
Copy link
Member

Hi! You're right that looking at the code lastmod does appear to be misidentified. Would you like to make a PR to update that? I think the example it's used in directly following seems correct, since it is defining a new Date, but would appreciate you looking at that too to figure out whether an update is also needed to the code sample.

As for considering changing the implementation, that's not something that docs can do. All we can do is document exactly how it does currently work. In order for your suggestion to be seen, you could file an issue on the main withastro/astro repo mentioning that this current behaviour is limiting. You can also mention this in our #feedback-ideas channel in the Astro Discord! Unfortunately, all we can do in the docs repo is correct the errors in the current documentation.

So I'll add help wanted on this issue and would welcome a PR to update this entry in docs!

@sarah11918 sarah11918 added good first issue Good for newcomers help wanted Issues looking for someone to run with them! labels Dec 13, 2024
@tkskto
Copy link
Author

tkskto commented Dec 14, 2024

Okay, I understand. I will suggest to the main Astro repository. The content that needs to be addressed in this issue might change depending on it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)
Projects
None yet
Development

No branches or pull requests

2 participants