better_seo 0.13.0 → 1.0.0.1
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 +4 -4
- data/CHANGELOG.md +121 -3
- data/README.md +299 -181
- data/docs/00_OVERVIEW.md +472 -0
- data/docs/01_CORE_AND_CONFIGURATION.md +913 -0
- data/docs/02_META_TAGS_AND_OPEN_GRAPH.md +251 -0
- data/docs/03_STRUCTURED_DATA.md +140 -0
- data/docs/04_SITEMAP_AND_ROBOTS.md +131 -0
- data/docs/05_RAILS_INTEGRATION.md +175 -0
- data/docs/06_I18N_PAGE_GENERATOR.md +233 -0
- data/docs/07_IMAGE_OPTIMIZATION.md +260 -0
- data/docs/DEPENDENCIES.md +383 -0
- data/docs/README.md +180 -0
- data/docs/TESTING_STRATEGY.md +663 -0
- data/lib/better_seo/analytics/google_analytics.rb +83 -0
- data/lib/better_seo/analytics/google_tag_manager.rb +74 -0
- data/lib/better_seo/configuration.rb +316 -0
- data/lib/better_seo/dsl/base.rb +86 -0
- data/lib/better_seo/dsl/meta_tags.rb +55 -0
- data/lib/better_seo/dsl/open_graph.rb +109 -0
- data/lib/better_seo/dsl/twitter_cards.rb +131 -0
- data/lib/better_seo/errors.rb +31 -0
- data/lib/better_seo/generators/amp_generator.rb +83 -0
- data/lib/better_seo/generators/breadcrumbs_generator.rb +126 -0
- data/lib/better_seo/generators/canonical_url_manager.rb +106 -0
- data/lib/better_seo/generators/meta_tags_generator.rb +100 -0
- data/lib/better_seo/generators/open_graph_generator.rb +110 -0
- data/lib/better_seo/generators/robots_txt_generator.rb +102 -0
- data/lib/better_seo/generators/twitter_cards_generator.rb +102 -0
- data/lib/better_seo/image/optimizer.rb +143 -0
- data/lib/better_seo/rails/helpers/controller_helpers.rb +118 -0
- data/lib/better_seo/rails/helpers/seo_helper.rb +176 -0
- data/lib/better_seo/rails/helpers/structured_data_helper.rb +123 -0
- data/lib/better_seo/rails/model_helpers.rb +62 -0
- data/lib/better_seo/rails/railtie.rb +22 -0
- data/lib/better_seo/sitemap/builder.rb +65 -0
- data/lib/better_seo/sitemap/generator.rb +57 -0
- data/lib/better_seo/sitemap/sitemap_index.rb +73 -0
- data/lib/better_seo/sitemap/url_entry.rb +157 -0
- data/lib/better_seo/structured_data/article.rb +55 -0
- data/lib/better_seo/structured_data/base.rb +73 -0
- data/lib/better_seo/structured_data/breadcrumb_list.rb +49 -0
- data/lib/better_seo/structured_data/event.rb +207 -0
- data/lib/better_seo/structured_data/faq_page.rb +55 -0
- data/lib/better_seo/structured_data/generator.rb +75 -0
- data/lib/better_seo/structured_data/how_to.rb +96 -0
- data/lib/better_seo/structured_data/local_business.rb +94 -0
- data/lib/better_seo/structured_data/organization.rb +67 -0
- data/lib/better_seo/structured_data/person.rb +51 -0
- data/lib/better_seo/structured_data/product.rb +123 -0
- data/lib/better_seo/structured_data/recipe.rb +135 -0
- data/lib/better_seo/validators/seo_recommendations.rb +165 -0
- data/lib/better_seo/validators/seo_validator.rb +195 -0
- data/lib/better_seo/version.rb +1 -1
- data/lib/better_seo.rb +5 -0
- data/lib/generators/better_seo/install_generator.rb +21 -0
- data/lib/generators/better_seo/templates/README +29 -0
- data/lib/generators/better_seo/templates/better_seo.rb +40 -0
- metadata +69 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 507003d76d3eedffa07e6776b1d3c85587dadbfdb2665676da1bafb6d665a511
|
|
4
|
+
data.tar.gz: fa6ac80a9ab08d08d838d27b214e475434e5451f296bbde5c48ed98d65d5f20b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 130e3fb72ab739cf5704deb58d77659fe3211d09fa161709dcf23c46ca0dca26e68279dc53e918442cdf77abc35eb66012016d9b78e7cc8252ac494bd0af1933
|
|
7
|
+
data.tar.gz: bc15e92231f050dde81e3eaa5c5ac8d78c6d82d7024e537402e035b01f910abdcf46f5a5e83dd7b75b38a15267b08e9e49d79584ef23736efeec33f17f5a1c27
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,103 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.0] - 2025-01-23 🎉
|
|
11
|
+
|
|
12
|
+
### 🚀 First Stable Release - Production Ready!
|
|
13
|
+
|
|
14
|
+
BetterSeo v1.0.0 is a comprehensive, production-ready SEO gem for Ruby and Rails applications.
|
|
15
|
+
|
|
16
|
+
### Highlights
|
|
17
|
+
|
|
18
|
+
- **899 tests passing** with **94.3% code coverage**
|
|
19
|
+
- **Strict TDD methodology** - Every feature developed with RED → GREEN → REFACTOR
|
|
20
|
+
- **Complete SEO toolkit** - Meta tags, structured data, sitemaps, analytics, validation
|
|
21
|
+
- **Enterprise-ready** - GTM integration, image optimization, SEO recommendations
|
|
22
|
+
- **Rails-first** - Deep Rails integration with helpers, generators, and railtie
|
|
23
|
+
- **Well documented** - Comprehensive README with 100+ examples
|
|
24
|
+
|
|
25
|
+
### What's Included
|
|
26
|
+
|
|
27
|
+
**Core SEO Features:**
|
|
28
|
+
- Meta tags DSL (title, description, keywords, robots, canonical)
|
|
29
|
+
- Open Graph protocol (complete implementation)
|
|
30
|
+
- Twitter Cards (all card types)
|
|
31
|
+
- 10+ Structured Data types (Schema.org JSON-LD)
|
|
32
|
+
- XML Sitemaps with extensions (hreflang, images, videos, sitemap index)
|
|
33
|
+
|
|
34
|
+
**Advanced Features:**
|
|
35
|
+
- Robots.txt generator
|
|
36
|
+
- SEO Validator with scoring (0-100)
|
|
37
|
+
- AI-powered SEO recommendations
|
|
38
|
+
- Image optimizer (WebP conversion, resize, compress)
|
|
39
|
+
- Breadcrumbs HTML generator with Schema.org
|
|
40
|
+
- AMP HTML support
|
|
41
|
+
- Canonical URL management
|
|
42
|
+
|
|
43
|
+
**Analytics & Tracking:**
|
|
44
|
+
- Google Analytics 4 (GA4) integration
|
|
45
|
+
- Google Tag Manager (GTM) complete setup
|
|
46
|
+
- E-commerce tracking
|
|
47
|
+
- Custom event tracking
|
|
48
|
+
- GDPR-compliant (anonymize IP)
|
|
49
|
+
|
|
50
|
+
**Rails Integration:**
|
|
51
|
+
- View helpers for all features
|
|
52
|
+
- Controller helpers (set_page_title, set_page_description, etc.)
|
|
53
|
+
- Model helpers (seo_attributes macro)
|
|
54
|
+
- Install generator (`rails g better_seo:install`)
|
|
55
|
+
- Automatic railtie initialization
|
|
56
|
+
|
|
57
|
+
### Migration from v0.14.0
|
|
58
|
+
|
|
59
|
+
No breaking changes. Simply update your Gemfile:
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
gem 'better_seo', '~> 1.0'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Thank You!
|
|
66
|
+
|
|
67
|
+
This gem was developed with **strict Test-Driven Development** through 14 development steps, implementing every feature with comprehensive test coverage. Special thanks to the Ruby and Rails communities for their excellent tools and documentation.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## [0.14.0] - 2025-01-23
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- SEO Intelligence & Advanced Analytics features
|
|
75
|
+
- **Google Tag Manager** (`BetterSeo::Analytics::GoogleTagManager`)
|
|
76
|
+
- `to_head_script(nonce:)` - Generate GTM head script tag
|
|
77
|
+
- `to_body_noscript` - Generate GTM body noscript fallback
|
|
78
|
+
- `push_data_layer(**data)` - Push custom data to data layer
|
|
79
|
+
- `push_ecommerce(event:, ecommerce:)` - Push e-commerce events
|
|
80
|
+
- `push_user_data(**user_data)` - Push user information
|
|
81
|
+
- Custom data layer name support
|
|
82
|
+
- CSP nonce support for Content Security Policy
|
|
83
|
+
- Complete GTM integration for enterprise analytics
|
|
84
|
+
- **SEO Recommendations Engine** (`BetterSeo::Validators::SeoRecommendations`)
|
|
85
|
+
- `generate_recommendations(validation_result)` - AI-powered SEO suggestions
|
|
86
|
+
- `recommend_title_improvements(title_result)` - Title optimization tips
|
|
87
|
+
- `recommend_description_improvements(desc_result)` - Description enhancements
|
|
88
|
+
- `recommend_heading_improvements(headings_result)` - Heading structure fixes
|
|
89
|
+
- `recommend_image_improvements(images_result)` - Image alt text suggestions
|
|
90
|
+
- `format_recommendations(recommendations)` - Markdown formatted output
|
|
91
|
+
- Priority-based recommendations (high, medium, low)
|
|
92
|
+
- Actionable improvement steps with details
|
|
93
|
+
- Integration with SEO Validator
|
|
94
|
+
|
|
95
|
+
### Enhanced
|
|
96
|
+
- Analytics module expanded with GTM support
|
|
97
|
+
- Validators module enhanced with intelligent recommendations
|
|
98
|
+
- Comprehensive SEO improvement workflow
|
|
99
|
+
|
|
100
|
+
### Test Coverage
|
|
101
|
+
- 899 tests passing (+25 from v0.13.0)
|
|
102
|
+
- 94.3% code coverage (1817/1926 lines)
|
|
103
|
+
- 25 new tests across intelligence features:
|
|
104
|
+
- Google Tag Manager: 11 tests
|
|
105
|
+
- SEO Recommendations: 14 tests
|
|
106
|
+
|
|
10
107
|
## [0.13.0] - 2025-01-23
|
|
11
108
|
|
|
12
109
|
### Added
|
|
@@ -39,12 +136,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
39
136
|
- Comprehensive validation rules following SEO best practices
|
|
40
137
|
- Detailed error messages with actionable recommendations
|
|
41
138
|
|
|
139
|
+
- **Image Optimizer** (`BetterSeo::Image::Optimizer`)
|
|
140
|
+
- `validate_format!(path)` - Validate image format (JPEG, PNG, WebP, GIF)
|
|
141
|
+
- `convert_to_webp(source, destination)` - Convert images to WebP format
|
|
142
|
+
- `resize(source, destination, width:, height:)` - Resize images
|
|
143
|
+
- `compress(source, destination)` - Compress images with quality setting
|
|
144
|
+
- `generate_responsive(source, output_dir, sizes:)` - Generate multiple sizes
|
|
145
|
+
- `optimize(source, destination, resize:)` - Complete optimization with statistics
|
|
146
|
+
- Requires ImageMagick and mini_magick gem
|
|
147
|
+
- Quality control (0-100)
|
|
148
|
+
- Optimization statistics (size reduction percentage)
|
|
149
|
+
- **Analytics Integration** (`BetterSeo::Analytics::GoogleAnalytics`)
|
|
150
|
+
- `to_script_tag(nonce:, **config)` - Generate GA4 script tag
|
|
151
|
+
- `track_event(event_name, **parameters)` - Custom event tracking
|
|
152
|
+
- `track_page_view(page_path, title:)` - Page view tracking
|
|
153
|
+
- `ecommerce_purchase(transaction_id:, value:, items:)` - E-commerce tracking
|
|
154
|
+
- Anonymize IP support for GDPR compliance
|
|
155
|
+
- CSP nonce support for Content Security Policy
|
|
156
|
+
- Custom configuration options
|
|
157
|
+
|
|
42
158
|
### Test Coverage
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
159
|
+
- 874 tests passing (+63 from v0.12.0)
|
|
160
|
+
- 94.1% code coverage (1723/1831 lines)
|
|
161
|
+
- 63 new tests across all advanced features:
|
|
46
162
|
- Robots.txt Generator: 25 tests
|
|
47
163
|
- SEO Validator: 22 tests
|
|
164
|
+
- Image Optimizer: 5 tests (+ ImageMagick-dependent)
|
|
165
|
+
- Google Analytics: 11 tests
|
|
48
166
|
|
|
49
167
|
## [0.12.0] - 2025-01-23
|
|
50
168
|
|