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

Implement sitemap generation using the 'sitemap_generator' gem #52

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

joancodes
Copy link
Contributor

Notable Changes

  • This PR aims to add sitemap generation for hotwire.io to improve SEO by providing search engines with structured access to the site's pages.

Issue #47

Screenshots (Optional)

  • N/A

Todo

  • N/A

This commit adds sitemap generation for our Sitepress-enabled app. It iterates through all PageModel instances, adding their paths to the sitemap with appropriate change frequencies and priorities. The sitemap helps improve SEO by providing search engines with structured access to our site's pages.
@joancodes
Copy link
Contributor Author

Hi @marcoroth, this is ready for review.

Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

This is great. Thank you @joancodes! I just two small things, otherwise this looks good to me

config/sitemap.rb Outdated Show resolved Hide resolved
public/robots.txt Outdated Show resolved Hide resolved
@joancodes
Copy link
Contributor Author

Hi @marcoroth, I have made the necessary changes.

Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for working on this @joancodes! 🚀

@marcoroth marcoroth merged commit 4a71f10 into marcoroth:main Oct 24, 2023
1 check passed
Copy link

@gismoog gismoog Oct 29, 2023

Choose a reason for hiding this comment

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

Hello,

Google ignores priority and changefreq values. Google uses the lastmod value if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate.

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks @gismoog! Do you have an idea how to properly implement this? It seems like the lastmod defaults to Time.now (at the time when the sitemap was generated).

It least this is how it looks in the current sitemap.xml.gz:

CleanShot 2023-10-29 at 20 02 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants