better_seo 0.9.0 → 0.10.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 +4 -4
- data/CHANGELOG.md +41 -0
- data/README.md +14 -15
- data/lib/better_seo/version.rb +1 -1
- data/lib/better_seo.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 181be2cb7b7341c4b6d304b2d093351f0259212d880406d1a3673e1ceb4dbd98
|
|
4
|
+
data.tar.gz: 812c35ed74e6250712fa668abbe8274069e601bc5d9bb342283e95061c5f7d83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 546233d6a80cc7780d642fd6cf96dcc2ee931dbc39a444a9fc224173579af8a7e8235f9a588a5d212f31c5930c0d6f007fc778090c11baca021ffb690c8b85aa
|
|
7
|
+
data.tar.gz: 4d2620e7b9c8b517d4c412b24b7f7b0b7e3aaf76d4c16f8b9c29357fb9517f1a85225b4130f816902553a0800db0f1aa51999120c07ea6973c138ebfbee7c9a7
|
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.10.0] - 2025-01-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Advanced Rails Integration for seamless framework integration
|
|
14
|
+
- **Controller Helpers** (`BetterSeo::Rails::Helpers::ControllerHelpers`)
|
|
15
|
+
- `set_page_title(title, prefix:, suffix:)` - Set page title with optional prefix/suffix
|
|
16
|
+
- `set_page_description(description, max_length:)` - Set description with auto-truncation
|
|
17
|
+
- `set_page_keywords(keywords)` - Set keywords from array or comma-separated string
|
|
18
|
+
- `set_page_image(url, width:, height:)` - Set OG and Twitter image with dimensions
|
|
19
|
+
- `set_canonical(url)` - Set canonical URL
|
|
20
|
+
- `set_noindex(nofollow:)` - Set noindex robot directive
|
|
21
|
+
- `set_meta_tags(data)` - Set custom meta tags (hash or block)
|
|
22
|
+
- `set_og_tags(data)` - Set Open Graph tags (hash or block)
|
|
23
|
+
- `set_twitter_tags(data)` - Set Twitter Card tags (hash or block)
|
|
24
|
+
- `better_seo_data` - Access all stored SEO data
|
|
25
|
+
- **Model Helpers** (`BetterSeo::Rails::ModelHelpers`)
|
|
26
|
+
- `seo_attributes(mappings)` - Class macro for defining SEO attribute mappings
|
|
27
|
+
- Support for symbol, proc, and direct value mappings
|
|
28
|
+
- `seo_title`, `seo_description`, `seo_keywords`, etc. - Auto-generated accessor methods
|
|
29
|
+
- `to_seo_hash` - Convert model to SEO hash for easy controller integration
|
|
30
|
+
- **Railtie** (`BetterSeo::Rails::Railtie`)
|
|
31
|
+
- Automatic helper injection into ActionController
|
|
32
|
+
- Automatic view helper injection into ActionView
|
|
33
|
+
- No manual configuration required
|
|
34
|
+
- **Install Generator** (`rails generate better_seo:install`)
|
|
35
|
+
- Creates `config/initializers/better_seo.rb` with comprehensive defaults
|
|
36
|
+
- Includes examples for all configuration options
|
|
37
|
+
- Shows usage instructions after installation
|
|
38
|
+
|
|
39
|
+
### Enhanced
|
|
40
|
+
- Controller helpers now available as `helper_method` in views
|
|
41
|
+
- All helpers support both hash and block syntax for flexibility
|
|
42
|
+
- SEO data stored in controller instance variable accessible in views
|
|
43
|
+
|
|
44
|
+
### Test Coverage
|
|
45
|
+
- 707 tests passing (+38 from v0.9.0)
|
|
46
|
+
- 95.99% code coverage (1293/1347 lines)
|
|
47
|
+
- 38 new tests across Rails integration:
|
|
48
|
+
- ControllerHelpers: 26 tests
|
|
49
|
+
- ModelHelpers: 12 tests
|
|
50
|
+
|
|
10
51
|
## [0.9.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
|
-
[](https://github.com/yourusername/better_seo)
|
|
6
|
+
[](https://github.com/yourusername/better_seo)
|
|
7
7
|
[](https://www.ruby-lang.org)
|
|
8
8
|
[](https://rubyonrails.org)
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
-
### ✅ Implemented (v0.
|
|
12
|
+
### ✅ Implemented (v0.10.0)
|
|
13
13
|
|
|
14
14
|
- **Core Configuration System**
|
|
15
15
|
- Singleton configuration with block-style setup
|
|
@@ -32,9 +32,13 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
|
|
|
32
32
|
- HTML entity escaping for security
|
|
33
33
|
- Integration with DSL builders
|
|
34
34
|
|
|
35
|
-
- **Rails Integration**
|
|
35
|
+
- **Rails Integration** - Complete framework integration
|
|
36
36
|
- **SEO View Helpers**: `seo_meta_tags`, `seo_open_graph_tags`, `seo_twitter_tags`, `seo_tags`
|
|
37
37
|
- **Structured Data Helpers**: `structured_data_tag`, `organization_sd`, `article_sd`, `person_sd`, `product_sd`, `breadcrumb_list_sd`, `local_business_sd`, `event_sd`, `faq_page_sd`, `how_to_sd`, `recipe_sd`
|
|
38
|
+
- **Controller Helpers**: `set_page_title`, `set_page_description`, `set_page_keywords`, `set_page_image`, `set_canonical`, `set_noindex`, `set_meta_tags`, `set_og_tags`, `set_twitter_tags`
|
|
39
|
+
- **Model Helpers**: `seo_attributes` macro for automatic SEO from model attributes
|
|
40
|
+
- **Railtie**: Automatic initialization and helper injection
|
|
41
|
+
- **Generator**: `rails generate better_seo:install` creates initializer
|
|
38
42
|
- Support for hash configuration and DSL blocks
|
|
39
43
|
- Automatic HTML safety with `raw` helper
|
|
40
44
|
- Integration with global configuration defaults
|
|
@@ -68,18 +72,12 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
|
|
|
68
72
|
|
|
69
73
|
### 🚧 Planned
|
|
70
74
|
|
|
71
|
-
- **Advanced Generators** (
|
|
75
|
+
- **Advanced Generators** (v1.1.0)
|
|
72
76
|
- Breadcrumbs HTML generator
|
|
73
77
|
- AMP HTML generator
|
|
74
78
|
- Canonical URL management
|
|
75
79
|
|
|
76
|
-
- **Advanced
|
|
77
|
-
- Controller helpers for setting page SEO
|
|
78
|
-
- Railtie for automatic initialization
|
|
79
|
-
- Generator for initializer file
|
|
80
|
-
- Automatic meta tags from model attributes
|
|
81
|
-
|
|
82
|
-
- **Advanced Sitemap Features** (v0.7.0)
|
|
80
|
+
- **Advanced Sitemap Features** (v1.1.0)
|
|
83
81
|
- Multi-language sitemap support (hreflang)
|
|
84
82
|
- Sitemap index for large sites (50,000+ URLs)
|
|
85
83
|
- Image/video sitemap extensions
|
|
@@ -1645,13 +1643,14 @@ bundle exec rspec --format documentation
|
|
|
1645
1643
|
```
|
|
1646
1644
|
|
|
1647
1645
|
Current test statistics:
|
|
1648
|
-
- **
|
|
1649
|
-
- **95.
|
|
1646
|
+
- **707 tests** passing
|
|
1647
|
+
- **95.99% code coverage** (1293/1347 lines)
|
|
1650
1648
|
- **3 DSL builders** fully tested
|
|
1651
1649
|
- **3 HTML generators** fully tested
|
|
1652
|
-
- **
|
|
1650
|
+
- **3 Rails helper modules** fully tested (View, Controller, Model)
|
|
1653
1651
|
- **10 Structured data types** fully tested
|
|
1654
1652
|
- **1 Sitemap generation system** fully tested
|
|
1653
|
+
- **1 Railtie and Generator** fully tested
|
|
1655
1654
|
- **1 core configuration system** fully tested
|
|
1656
1655
|
|
|
1657
1656
|
## Architecture
|
data/lib/better_seo/version.rb
CHANGED
data/lib/better_seo.rb
CHANGED
|
@@ -30,6 +30,8 @@ require_relative "better_seo/structured_data/recipe"
|
|
|
30
30
|
require_relative "better_seo/structured_data/generator"
|
|
31
31
|
require_relative "better_seo/rails/helpers/seo_helper"
|
|
32
32
|
require_relative "better_seo/rails/helpers/structured_data_helper"
|
|
33
|
+
require_relative "better_seo/rails/helpers/controller_helpers"
|
|
34
|
+
require_relative "better_seo/rails/model_helpers"
|
|
33
35
|
|
|
34
36
|
module BetterSeo
|
|
35
37
|
class << self
|