page_structured_data 1.0.8 → 1.0.9
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 +5 -0
- data/README.md +3 -0
- data/app/src/page_structured_data/page_types/organization.rb +6 -2
- data/lib/page_structured_data/version.rb +1 -1
- 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: 53bab1f6112cc7060c86d1eedc6096770ea5a6363a9d4e9939094f3576a417cf
|
|
4
|
+
data.tar.gz: ecea9e6efd8b44bf45565ec1a790905b55e7794579a91d2b157dec1325ad89c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fda27db244422de502060211a86f759ca0fe7249a8a370fb7d3f7a89ed2f732181eff65d7c8b19ab48a61cc9be4168dae18c14edb1016d2ba7d97941b343c50b
|
|
7
|
+
data.tar.gz: 78dcbcefc064a3806f41c8f8d83f1943181e05c260501a207cff31ff425f5ad68e2fcf6d436351e4a58ded9c2c4ee12b4768d0f1f27c822951bde8682b4f381d
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.0.9 - 2026-05-06
|
|
8
|
+
|
|
9
|
+
- Add release preparation script and release checklist documentation.
|
|
10
|
+
- Add `to_h` schema hash API for organization page types.
|
|
11
|
+
|
|
7
12
|
## 1.0.8 - 2026-05-06
|
|
8
13
|
|
|
9
14
|
- Add `PageStructuredData::PageTypes::Organization` for schema.org Organization JSON-LD.
|
data/README.md
CHANGED
|
@@ -272,6 +272,7 @@ PageStructuredData::PageTypes::Organization.new(
|
|
|
272
272
|
|
|
273
273
|
Important methods:
|
|
274
274
|
|
|
275
|
+
- `to_h`: returns a structured hash for organization JSON-LD.
|
|
275
276
|
- `json_ld`: returns an organization JSON-LD script tag.
|
|
276
277
|
|
|
277
278
|
## Development
|
|
@@ -288,6 +289,8 @@ Verify the gem can be required:
|
|
|
288
289
|
ruby -Ilib -e 'require "page_structured_data"; puts PageStructuredData::VERSION'
|
|
289
290
|
```
|
|
290
291
|
|
|
292
|
+
Release instructions are documented in [docs/release.md](docs/release.md).
|
|
293
|
+
|
|
291
294
|
## Compatibility Policy
|
|
292
295
|
|
|
293
296
|
This gem is used in production applications. Changes should preserve existing public APIs and rendered output unless a breaking change is intentionally released in a major version.
|
|
@@ -14,7 +14,7 @@ module PageStructuredData
|
|
|
14
14
|
@parent_organization = parent_organization
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def
|
|
17
|
+
def to_h # rubocop:disable Metrics/MethodLength
|
|
18
18
|
node = {
|
|
19
19
|
'@context': 'https://schema.org',
|
|
20
20
|
'@type': 'Organization',
|
|
@@ -33,9 +33,13 @@ module PageStructuredData
|
|
|
33
33
|
}
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
node
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def json_ld
|
|
36
40
|
%(
|
|
37
41
|
<script type="application/ld+json">
|
|
38
|
-
#{
|
|
42
|
+
#{to_h.to_json}
|
|
39
43
|
</script>
|
|
40
44
|
)
|
|
41
45
|
end
|