Skip to content

Ruby 3.4 support and Yoast-inspired SEO features#1

Merged
marcosgz merged 31 commits intomainfrom
marcosgz/ruby-upgrade
Apr 16, 2026
Merged

Ruby 3.4 support and Yoast-inspired SEO features#1
marcosgz merged 31 commits intomainfrom
marcosgz/ruby-upgrade

Conversation

@marcosgz
Copy link
Copy Markdown
Owner

@marcosgz marcosgz commented Apr 14, 2026

Summary

  • Ruby 3.4 compatibility — updated dependencies and fixed offenses
  • Configurable max URLs per sitemapconfig.max_links (default 50k, set to 1k for Yoast-style performance)
  • Priority/changefreq deprecationconfig.emit_priority and config.emit_changefreq flags to omit elements Google ignores
  • XSL stylesheets — human-readable HTML display when sitemaps are opened in a browser, with built-in templates for both URL sets and sitemap indexes
  • Rack middlewareSiteMaps::Middleware serves sitemaps with X-Robots-Tag: noindex, follow, proper Content-Type, Cache-Control, XSL endpoints, and 301 redirects for page 0/1 URL normalization
  • robots.txt helperSiteMaps::RobotsTxt generates the Sitemap: directive
  • Search engine pingSiteMaps::Ping notifies Bing after generation (Google deprecated their endpoint), integrated with Runner and notification system
  • Sitemap index lastmod propagation — index lastmod now reflects the most recent child sitemap instead of Time.now
  • External sitemap registrationexternal_sitemap DSL adds third-party sitemaps to the index
  • URL filtering callbacksurl_filter blocks to exclude or modify URLs before they enter the sitemap
  • README rewrite — full documentation of all features with table of contents

Test plan

  • bundle exec rspec — 360 examples, 0 failures
  • bundle exec rubocop — 0 offenses
  • Verify XSL rendering by opening a generated sitemap XML in a browser
  • Test middleware with a Rack app serving sitemaps at configured paths
  • Verify SiteMaps::RobotsTxt.render output
  • Verify SiteMaps::Ping.ping with webmock stubs
  • Verify URL filtering excludes/modifies URLs in process blocks
  • Verify external sitemaps appear in the sitemap index

@marcosgz marcosgz force-pushed the marcosgz/ruby-upgrade branch from f0cc487 to ac285b1 Compare April 15, 2026 04:36
@marcosgz marcosgz changed the title ruby 3.4 support Ruby 3.4 support and Yoast-inspired SEO features Apr 15, 2026
marcosgz added 17 commits April 15, 2026 02:22
Switch define block params from positional to keyword args (|site:| instead
of |site|), and context: values from raw objects/arrays to a Hash that is
splatted as kwargs. Update multi-array test to match the new contract.
@marcosgz marcosgz force-pushed the marcosgz/ruby-upgrade branch from e84910d to 15ed88e Compare April 15, 2026 18:06
@marcosgz marcosgz merged commit ae3f0c5 into main Apr 16, 2026
4 checks passed
@marcosgz marcosgz deleted the marcosgz/ruby-upgrade branch April 16, 2026 16:34
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.

1 participant