better_seo 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 181be2cb7b7341c4b6d304b2d093351f0259212d880406d1a3673e1ceb4dbd98
4
- data.tar.gz: 812c35ed74e6250712fa668abbe8274069e601bc5d9bb342283e95061c5f7d83
3
+ metadata.gz: 1c99ac27d15378d081160acc05a0cfa384a32f732deb452e3ba404d13b040ca7
4
+ data.tar.gz: a7f07d8267cdc57c2a09f86e7c26167fc7c1f23c3ef73df944aa6bc6bc8a87e0
5
5
  SHA512:
6
- metadata.gz: 546233d6a80cc7780d642fd6cf96dcc2ee931dbc39a444a9fc224173579af8a7e8235f9a588a5d212f31c5930c0d6f007fc778090c11baca021ffb690c8b85aa
7
- data.tar.gz: 4d2620e7b9c8b517d4c412b24b7f7b0b7e3aaf76d4c16f8b9c29357fb9517f1a85225b4130f816902553a0800db0f1aa51999120c07ea6973c138ebfbee7c9a7
6
+ metadata.gz: 413a2b9f1342f61fe4b5f26f22a6f9d3152f775699bdc51f105aa77e5740ac78030da6ae06ba6397b2372fb996e8d343a52469a972bb6996d67f9358c4ca7dfc
7
+ data.tar.gz: 1bf40ac3c4e21559eda6cb663f44c8aaef5b2ed8c58e43a06b44028df9f1833d908eb0c44159ec12c467c7b3c6ea7001b2ebc188ba27a06de81d95c34e06bbef
data/CHANGELOG.md CHANGED
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.11.0] - 2025-01-23
11
+
12
+ ### Added
13
+ - Advanced Sitemap Features for large and international sites
14
+ - **Multi-language Support (hreflang)**
15
+ - `UrlEntry#add_alternate(href, hreflang:)` - Add alternate language versions
16
+ - Support for region-specific alternates (en-US, en-GB, etc.)
17
+ - x-default alternate support for default language
18
+ - Automatic xhtml:link tag generation in XML
19
+ - Method chaining for adding multiple alternates
20
+ - **Image Sitemap Extensions**
21
+ - `UrlEntry#add_image(loc, title:, caption:)` - Add images to URLs
22
+ - Support for multiple images per URL
23
+ - Automatic image:image tag generation
24
+ - Optional title and caption metadata
25
+ - **Video Sitemap Extensions**
26
+ - `UrlEntry#add_video(thumbnail_loc:, title:, description:, content_loc:, duration:)` - Add videos to URLs
27
+ - Support for multiple videos per URL
28
+ - Automatic video:video tag generation
29
+ - Optional duration metadata
30
+ - **Sitemap Index** (`BetterSeo::Sitemap::SitemapIndex`)
31
+ - Manage large sites with 50,000+ URLs
32
+ - Split sitemaps across multiple files
33
+ - `add_sitemap(loc, lastmod:)` - Add sitemaps to index
34
+ - `to_xml` - Generate sitemapindex XML
35
+ - `write_to_file(path)` - Write index to file
36
+ - Automatic directory creation
37
+
38
+ ### Enhanced
39
+ - `UrlEntry` now supports alternates, images, and videos arrays
40
+ - `UrlEntry#to_xml` includes all extensions (hreflang, images, videos)
41
+ - `UrlEntry#to_h` includes alternates when present
42
+
43
+ ### Test Coverage
44
+ - 742 tests passing (+35 from v0.10.0)
45
+ - 96.12% code coverage (1364/1419 lines)
46
+ - 35 new tests across advanced sitemap features:
47
+ - Hreflang support: 11 tests
48
+ - SitemapIndex: 12 tests
49
+ - Image/Video extensions: 12 tests
50
+
10
51
  ## [0.10.0] - 2025-01-23
11
52
 
12
53
  ### Added
data/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a clean, fluent DSL for managing meta tags, Open Graph, Twitter Cards, structured data, sitemaps, and more.
4
4
 
5
- [![Tests](https://img.shields.io/badge/tests-707%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
- [![Coverage](https://img.shields.io/badge/coverage-95.99%25-brightgreen)](https://github.com/yourusername/better_seo)
5
+ [![Tests](https://img.shields.io/badge/tests-742%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
+ [![Coverage](https://img.shields.io/badge/coverage-96.12%25-brightgreen)](https://github.com/yourusername/better_seo)
7
7
  [![Ruby](https://img.shields.io/badge/ruby-%3E%3D%203.0.0-red)](https://www.ruby-lang.org)
8
8
  [![Rails](https://img.shields.io/badge/rails-%3E%3D%206.1-red)](https://rubyonrails.org)
9
9
 
10
10
  ## Features
11
11
 
12
- ### ✅ Implemented (v0.10.0)
12
+ ### ✅ Implemented (v0.11.0)
13
13
 
14
14
  - **Core Configuration System**
15
15
  - Singleton configuration with block-style setup
@@ -43,10 +43,14 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
43
43
  - Automatic HTML safety with `raw` helper
44
44
  - Integration with global configuration defaults
45
45
 
46
- - **Sitemap Generation**
46
+ - **Sitemap Generation** - Advanced features for large sites
47
47
  - **XML Sitemap Builder**: Fluent API for building sitemaps
48
48
  - **Sitemap Generator**: Generate from blocks, arrays, or model collections
49
49
  - **URL Entry**: Full sitemap.org protocol support (loc, lastmod, changefreq, priority)
50
+ - **Multi-language Support**: hreflang alternates for international sites
51
+ - **Image Sitemaps**: Add images with title and caption to URLs
52
+ - **Video Sitemaps**: Add videos with thumbnail, title, description, duration
53
+ - **Sitemap Index**: Manage large sites with 50,000+ URLs across multiple sitemaps
50
54
  - **Dynamic Generation**: Lambda support for dynamic attributes
51
55
  - **File Writing**: Write sitemaps directly to files
52
56
  - **Rails Integration**: Controller actions and Rake tasks
@@ -72,17 +76,11 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
72
76
 
73
77
  ### 🚧 Planned
74
78
 
75
- - **Advanced Generators** (v1.1.0)
79
+ - **Advanced Generators** (v1.0.0)
76
80
  - Breadcrumbs HTML generator
77
81
  - AMP HTML generator
78
82
  - Canonical URL management
79
83
 
80
- - **Advanced Sitemap Features** (v1.1.0)
81
- - Multi-language sitemap support (hreflang)
82
- - Sitemap index for large sites (50,000+ URLs)
83
- - Image/video sitemap extensions
84
- - News sitemap support
85
-
86
84
  - **Advanced Features** (v0.6.0+)
87
85
  - robots.txt generator
88
86
  - Image optimization with WebP conversion
@@ -1643,13 +1641,13 @@ bundle exec rspec --format documentation
1643
1641
  ```
1644
1642
 
1645
1643
  Current test statistics:
1646
- - **707 tests** passing
1647
- - **95.99% code coverage** (1293/1347 lines)
1644
+ - **742 tests** passing
1645
+ - **96.12% code coverage** (1364/1419 lines)
1648
1646
  - **3 DSL builders** fully tested
1649
1647
  - **3 HTML generators** fully tested
1650
1648
  - **3 Rails helper modules** fully tested (View, Controller, Model)
1651
1649
  - **10 Structured data types** fully tested
1652
- - **1 Sitemap generation system** fully tested
1650
+ - **1 Advanced sitemap system** with hreflang, images, videos, and index
1653
1651
  - **1 Railtie and Generator** fully tested
1654
1652
  - **1 core configuration system** fully tested
1655
1653
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterSeo
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
data/lib/better_seo.rb CHANGED
@@ -16,6 +16,7 @@ require_relative "better_seo/generators/twitter_cards_generator"
16
16
  require_relative "better_seo/sitemap/url_entry"
17
17
  require_relative "better_seo/sitemap/builder"
18
18
  require_relative "better_seo/sitemap/generator"
19
+ require_relative "better_seo/sitemap/sitemap_index"
19
20
  require_relative "better_seo/structured_data/base"
20
21
  require_relative "better_seo/structured_data/organization"
21
22
  require_relative "better_seo/structured_data/article"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_seo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alessiobussolari