search-engine-optimization 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +18 -4
  4. data/app/views/mozaic/seo/_schema.html.erb +1 -1
  5. data/app/views/mozaic/seo/schema/_property.html.erb +1 -0
  6. data/app/views/mozaic/seo/schema/_type.html.erb +2 -0
  7. data/app/views/mozaic/seo/schema/types/_aggregate_rating.html.erb +5 -0
  8. data/app/views/mozaic/seo/schema/types/_article.html.erb +9 -0
  9. data/app/views/mozaic/seo/schema/types/_brand.html.erb +5 -0
  10. data/app/views/mozaic/seo/schema/types/_creative_work.html.erb +83 -0
  11. data/app/views/mozaic/seo/schema/types/_intangible.html.erb +1 -0
  12. data/app/views/mozaic/seo/schema/types/_organization.html.erb +48 -0
  13. data/app/views/mozaic/seo/schema/types/_person.html.erb +54 -0
  14. data/app/views/mozaic/seo/schema/types/_rating.html.erb +7 -0
  15. data/app/views/mozaic/seo/schema/types/_thing.html.erb +12 -0
  16. data/lib/search_engine_optimization/railtie.rb +12 -28
  17. data/lib/search_engine_optimization/version.rb +1 -1
  18. metadata +12 -12
  19. data/app/views/mozaic/seo/schema/_aggregate_rating.html.erb +0 -3
  20. data/app/views/mozaic/seo/schema/_article.html.erb +0 -11
  21. data/app/views/mozaic/seo/schema/_organization.html.erb +0 -3
  22. data/app/views/mozaic/seo/schema/_person.html.erb +0 -3
  23. data/app/views/mozaic/seo/schema/properties/_articleBody.html.erb +0 -1
  24. data/app/views/mozaic/seo/schema/properties/_articleSection.html.erb +0 -1
  25. data/app/views/mozaic/seo/schema/properties/_datePublished.html.erb +0 -1
  26. data/app/views/mozaic/seo/schema/properties/_image.html.erb +0 -1
  27. data/app/views/mozaic/seo/schema/properties/_name.html.erb +0 -1
  28. data/app/views/mozaic/seo/schema/properties/_ratingValue.html.erb +0 -1
  29. data/app/views/mozaic/seo/schema/properties/_url.html.erb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8fdf8d5825b0688600c216a8c0b5b65c389b136a73a9bd71d4c461f689f336e
4
- data.tar.gz: f71742110dbf6b42a0122b5cb49f0dc23776034de5ac03948e7970a43229ba4c
3
+ metadata.gz: fedb0aaf2120d413614f86c659a0c2591e23da47514861bf88acaceb672b4dbf
4
+ data.tar.gz: 10a7e6052e49b2dae7ead06009dd1deb1b85ede40864b65794db1ab339c4f59a
5
5
  SHA512:
6
- metadata.gz: d0e7b18db7032f86642f8eac7da11f20e9ff3cd781bcec9428dd1df783e89479dbd08162c9dce06200ff0448f2f2ab94aefb45226f92332f6f2bf06f8843e8b3
7
- data.tar.gz: ccf1f369fc39346c5939a685fb3033c22e5b8cba2ccaaa11213345c19bbc9727259c5c81ea39e0ec8cff099fa2e21b9f9e4da3527a632fd11d7380ea1c48d49c
6
+ metadata.gz: b0f00c90ad0f99ae2383aee00c7079612f42960c2f5f42e3d068ae34319732d83e1a2493ad2dd762e103d8a11737b59af0c3d3697948639eaf2b5d20773a35b8
7
+ data.tar.gz: 263a79f5a0aea7d66ed55c0fbba9df0ff92335ae65e16b4e004b2bba91a816e7bb4047aeedaaad3e6ec4c843b5788a6e3c412f0bffdb79eb67d697226c0e8452
data/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 1.1.0 - 2018/02/17
8
+
9
+ * features
10
+ * new `Brand` type
11
+ * new `CreativeWork` type
12
+ * new `Intangible` type
13
+ * new `Rating` type
14
+ * new `Thing` type
15
+
7
16
  ### 1.0.2 - 2018/02/17
8
17
 
9
18
  * bugfixes
data/README.md CHANGED
@@ -12,6 +12,7 @@ Advanced SEO for Rails apps with schema tags.
12
12
  * [Usage](#philosophy)
13
13
  * [Meta tags](#meta-tags)
14
14
  * [Schemas](#schemas)
15
+ * [Nested types](#nested-types)
15
16
  * [To Do](#to-do)
16
17
  * [Contributing](#contributing)
17
18
  * [Contributors](#contributors)
@@ -62,10 +63,23 @@ Use the `seo/schema` component:
62
63
 
63
64
  Here is a list of available types:
64
65
 
65
- * [`:aggregate_rating`](components/schemas/aggregate_rating.md)
66
- * [`:article`](components/schemas/article.md)
67
- * [`:organization`](components/schemas/organization.md)
68
- * [`:person`](components/schemas/person.md)
66
+ * [AggregateRating](components/schema/types/aggregate_rating.md)
67
+ * [Article](components/schema/types/article.md)
68
+ * [Brand](components/schema/types/brand.md)
69
+ * [CreativeWork](components/schema/types/creative_work.md)
70
+ * [Intangible](components/schema/types/intangible.md)
71
+ * [Organization](components/schema/types/organization.md)
72
+ * [Person](components/schema/types/person.md)
73
+ * [Rating](components/schema/types/rating.md)
74
+ * [Thing](components/schema/types/thing.md)
75
+
76
+ #### Nested types
77
+
78
+ You can nest types in your schema tag:
79
+
80
+ ```haml
81
+ = component 'seo/schema', type: :person, name: 'Parent', children: [{ type: :person, name: 'Child 1' }, { type: :person, name: 'Child 2' }], parent: { type: :person, name: 'Grandparent' }
82
+ ```
69
83
 
70
84
  ---
71
85
 
@@ -1,6 +1,6 @@
1
1
  <script type="application/ld+json">
2
2
  {
3
3
  "@context" : "http://schema.org",
4
- <%= component "seo/schema/#{options[:type].to_s.underscore}", options %>
4
+ <%= component 'seo/schema/type', options %>
5
5
  }
6
6
  </script>
@@ -0,0 +1 @@
1
+ <% if options[:value].is_a?(Array) %><% options[:value].each do |value| %><% if value.is_a?(Hash) %>"<%= options[:property] %>" : { <%= component "seo/schema/#{value.delete(:type)}", value %> }<% else %><% if value.is_a?(String) %>"<%= options[:property] %>" : "<%= value %>"<% elsif value.is_a?(Integer) %>"<%= options[:property] %>" : <%= value %><% end %><% end %><% end %><% else %><% if options[:value].is_a?(Hash) %>"<%= options[:property] %>" : { <%= component "seo/schema/#{options[:value].delete(:type)}", options[:value] %> }<% else %><% if options[:value].is_a?(String) %>"<%= options[:property] %>" : "<%= options[:value] %>"<% elsif options[:value].is_a?(Integer) %>"<%= options[:property] %>" : <%= options[:value] %><% end %><% end %><% end %>
@@ -0,0 +1,2 @@
1
+ <% type = options.delete(:type).to_s.camelize %>"@type" : "<%= type %>",
2
+ <%= component "seo/schema/types/<%= type %>", options %>
@@ -0,0 +1,5 @@
1
+ <%= component 'seo/schema/property', property: 'itemReviewed', value: options.delete(:item_reviewed) %>,
2
+ <%= component 'seo/schema/property', property: 'ratingCount', value: options.delete(:rating_count) %>,
3
+ <%= component 'seo/schema/property', property: 'reviewCount', value: options.delete(:review_count) %>,
4
+
5
+ <%= component 'seo/schema/types/rating', options %>
@@ -0,0 +1,9 @@
1
+ <%= component 'seo/schema/property', property: 'articleBody', value: options.delete(:article_body) %>,
2
+ <%= component 'seo/schema/property', property: 'articleSection', value: options.delete(:article_section) %>,
3
+ <%= component 'seo/schema/property', property: 'pageEnd', value: options.delete(:page_end) %>,
4
+ <%= component 'seo/schema/property', property: 'pageStart', value: options.delete(:page_start) %>,
5
+ <%= component 'seo/schema/property', property: 'pagination', value: options.delete(:pagination) %>,
6
+ <%= component 'seo/schema/property', property: 'speakable', value: options.delete(:speakable) %>,
7
+ <%= component 'seo/schema/property', property: 'wordCount', value: options.delete(:word_count) %>,
8
+
9
+ <%= component 'seo/schema/types/creative_work', options %>
@@ -0,0 +1,5 @@
1
+ <%= component 'seo/schema/property', property: 'aggregateRating', value: options.delete(:aggregate_rating) %>,
2
+ <%= component 'seo/schema/property', property: 'logo', value: options.delete(:logo) %>,
3
+ <%= component 'seo/schema/property', property: 'review', value: options.delete(:review) %>,
4
+
5
+ <%= component 'seo/schema/types/thing', options %>
@@ -0,0 +1,83 @@
1
+ <%= component 'seo/schema/property', property: 'about', value: options.delete(:about) %>,
2
+ <%= component 'seo/schema/property', property: 'accessMode', value: options.delete(:access_mode) %>,
3
+ <%= component 'seo/schema/property', property: 'accessModeSufficient', value: options.delete(:access_mode_sufficient) %>,
4
+ <%= component 'seo/schema/property', property: 'accessibilityAPI', value: options.delete(:accessibility_api) %>,
5
+ <%= component 'seo/schema/property', property: 'accessiblitiyControl', value: options.delete(:accessibility_control) %>,
6
+ <%= component 'seo/schema/property', property: 'accessiblitiyFeature', value: options.delete(:accessibility_feature) %>,
7
+ <%= component 'seo/schema/property', property: 'accessiblitiyHazard', value: options.delete(:accessibility_hazard) %>,
8
+ <%= component 'seo/schema/property', property: 'accessiblitiySummary', value: options.delete(:accessibility_summary) %>,
9
+ <%= component 'seo/schema/property', property: 'accountablePerson', value: options.delete(:accountable_person) %>,
10
+ <%= component 'seo/schema/property', property: 'aggregateRating', value: options.delete(:aggregate_rating) %>,
11
+ <%= component 'seo/schema/property', property: 'alternativeHeadline', value: options.delete(:alternative_headline) %>,
12
+ <%= component 'seo/schema/property', property: 'associatedMedia', value: options.delete(:associatedMedia) %>,
13
+ <%= component 'seo/schema/property', property: 'audience', value: options.delete(:audience) %>,
14
+ <%= component 'seo/schema/property', property: 'audio', value: options.delete(:audio) %>,
15
+ <%= component 'seo/schema/property', property: 'author', value: options.delete(:author) %>,
16
+ <%= component 'seo/schema/property', property: 'award', value: options.delete(:award) %>,
17
+ <%= component 'seo/schema/property', property: 'character', value: options.delete(:character) %>,
18
+ <%= component 'seo/schema/property', property: 'citation', value: options.delete(:citation) %>,
19
+ <%= component 'seo/schema/property', property: 'comment', value: options.delete(:comment) %>,
20
+ <%= component 'seo/schema/property', property: 'commentCount', value: options.delete(:comment_count) %>,
21
+ <%= component 'seo/schema/property', property: 'contentLoaction', value: options.delete(:content_loaction) %>,
22
+ <%= component 'seo/schema/property', property: 'contentRating', value: options.delete(:content_rating) %>,
23
+ <%= component 'seo/schema/property', property: 'contentReferenceTime', value: options.delete(:content_reference_time) %>,
24
+ <%= component 'seo/schema/property', property: 'contributor', value: options.delete(:contributor) %>,
25
+ <%= component 'seo/schema/property', property: 'copyrightHolder', value: options.delete(:copyright_holder) %>,
26
+ <%= component 'seo/schema/property', property: 'copyrightYear', value: options.delete(:copyright_year) %>,
27
+ <%= component 'seo/schema/property', property: 'creator', value: options.delete(:creator) %>,
28
+ <%= component 'seo/schema/property', property: 'dateCreated', value: options.delete(:date_created) %>,
29
+ <%= component 'seo/schema/property', property: 'dateModified', value: options.delete(:date_modified) %>,
30
+ <%= component 'seo/schema/property', property: 'datePublished', value: options.delete(:date_published) %>,
31
+ <%= component 'seo/schema/property', property: 'discussionUrl', value: options.delete(:discussion_url) %>,
32
+ <%= component 'seo/schema/property', property: 'editor', value: options.delete(:editor) %>,
33
+ <%= component 'seo/schema/property', property: 'educationalAlignement', value: options.delete(:educational_alignement) %>,
34
+ <%= component 'seo/schema/property', property: 'educationalUse', value: options.delete(:educational_use) %>,
35
+ <%= component 'seo/schema/property', property: 'encoding', value: options.delete(:encoding) %>,
36
+ <%= component 'seo/schema/property', property: 'exampleOfWork', value: options.delete(:example_of_work) %>,
37
+ <%= component 'seo/schema/property', property: 'expires', value: options.delete(:expires) %>,
38
+ <%= component 'seo/schema/property', property: 'fileFormat', value: options.delete(:file_format) %>,
39
+ <%= component 'seo/schema/property', property: 'funder', value: options.delete(:funder) %>,
40
+ <%= component 'seo/schema/property', property: 'genre', value: options.delete(:genre) %>,
41
+ <%= component 'seo/schema/property', property: 'hasPart', value: options.delete(:has_part) %>,
42
+ <%= component 'seo/schema/property', property: 'headline', value: options.delete(:headline) %>,
43
+ <%= component 'seo/schema/property', property: 'inLanguage', value: options.delete(:in_language) %>,
44
+ <%= component 'seo/schema/property', property: 'interactionStatistic', value: options.delete(:interaction_statistic) %>,
45
+ <%= component 'seo/schema/property', property: 'interactivityType', value: options.delete(:interactivity_type) %>,
46
+ <%= component 'seo/schema/property', property: 'isAccessibleForFree', value: options.delete(:is_accessible_for_free) %>,
47
+ <%= component 'seo/schema/property', property: 'isBasedOn', value: options.delete(:is_based_on) %>,
48
+ <%= component 'seo/schema/property', property: 'isFamilyFriendly', value: options.delete(:is_family_friendly) %>,
49
+ <%= component 'seo/schema/property', property: 'isPartOf', value: options.delete(:is_part_of) %>,
50
+ <%= component 'seo/schema/property', property: 'keywords', value: options.delete(:keywords) %>,
51
+ <%= component 'seo/schema/property', property: 'learningResourceType', value: options.delete(:learning_resource_type) %>,
52
+ <%= component 'seo/schema/property', property: 'license', value: options.delete(:license) %>,
53
+ <%= component 'seo/schema/property', property: 'locationCreated', value: options.delete(:location_created) %>,
54
+ <%= component 'seo/schema/property', property: 'mainEntity', value: options.delete(:main_entity) %>,
55
+ <%= component 'seo/schema/property', property: 'material', value: options.delete(:material) %>,
56
+ <%= component 'seo/schema/property', property: 'mentions', value: options.delete(:mentions) %>,
57
+ <%= component 'seo/schema/property', property: 'offers', value: options.delete(:offers) %>,
58
+ <%= component 'seo/schema/property', property: 'position', value: options.delete(:position) %>,
59
+ <%= component 'seo/schema/property', property: 'producer', value: options.delete(:producer) %>,
60
+ <%= component 'seo/schema/property', property: 'provider', value: options.delete(:provider) %>,
61
+ <%= component 'seo/schema/property', property: 'publication', value: options.delete(:publication) %>,
62
+ <%= component 'seo/schema/property', property: 'publisher', value: options.delete(:publisher) %>,
63
+ <%= component 'seo/schema/property', property: 'publisherImprint', value: options.delete(:publisher_imprint) %>,
64
+ <%= component 'seo/schema/property', property: 'publishingPrinciples', value: options.delete(:publishing_principles) %>,
65
+ <%= component 'seo/schema/property', property: 'recordedAt', value: options.delete(:recorded_at) %>,
66
+ <%= component 'seo/schema/property', property: 'releasedEvent', value: options.delete(:released_event) %>,
67
+ <%= component 'seo/schema/property', property: 'review', value: options.delete(:review) %>,
68
+ <%= component 'seo/schema/property', property: 'sourceOrganization', value: options.delete(:source_organization) %>,
69
+ <%= component 'seo/schema/property', property: 'spacialCoverage', value: options.delete(:spatial_coverage) %>,
70
+ <%= component 'seo/schema/property', property: 'sponsor', value: options.delete(:sponsor) %>,
71
+ <%= component 'seo/schema/property', property: 'temporalCoverage', value: options.delete(:temporal_coverage) %>,
72
+ <%= component 'seo/schema/property', property: 'text', value: options.delete(:text) %>,
73
+ <%= component 'seo/schema/property', property: 'thumbnailURL', value: options.delete(:thumbnail_url) %>,
74
+ <%= component 'seo/schema/property', property: 'timeRequired', value: options.delete(:timeRequired) %>,
75
+ <%= component 'seo/schema/property', property: 'translationOfWork', value: options.delete(:translation_of_work) %>,
76
+ <%= component 'seo/schema/property', property: 'translator', value: options.delete(:translator) %>,
77
+ <%= component 'seo/schema/property', property: 'typicalAgeRange', value: options.delete(:typical_age_range) %>,
78
+ <%= component 'seo/schema/property', property: 'version', value: options.delete(:version) %>,
79
+ <%= component 'seo/schema/property', property: 'video', value: options.delete(:video) %>,
80
+ <%= component 'seo/schema/property', property: 'workExample', value: options.delete(:work_example) %>,
81
+ <%= component 'seo/schema/property', property: 'workTranslation', value: options.delete(:work_translation) %>,
82
+
83
+ <%= component 'seo/schema/types/thing', options %>
@@ -0,0 +1 @@
1
+ <%= component 'seo/schema/types/thing', options %>
@@ -0,0 +1,48 @@
1
+ <%= component 'seo/schema/property', property: 'actionableFeedbackPolicy', value: options.delete(:actionable_feedback_policy) %>,
2
+ <%= component 'seo/schema/property', property: 'address', value: options.delete(:address) %>,
3
+ <%= component 'seo/schema/property', property: 'aggregateRating', value: options.delete(:aggregate_rating) %>,
4
+ <%= component 'seo/schema/property', property: 'alumni', value: options.delete(:alumni) %>,
5
+ <%= component 'seo/schema/property', property: 'areaServed', value: options.delete(:area_served) %>,
6
+ <%= component 'seo/schema/property', property: 'award', value: options.delete(:award) %>,
7
+ <%= component 'seo/schema/property', property: 'brand', value: options.delete(:brand) %>,
8
+ <%= component 'seo/schema/property', property: 'contactPoint', value: options.delete(:contact_point) %>,
9
+ <%= component 'seo/schema/property', property: 'correctionsPolicy', value: options.delete(:corrections_policy) %>,
10
+ <%= component 'seo/schema/property', property: 'department', value: options.delete(:department) %>,
11
+ <%= component 'seo/schema/property', property: 'dissolutionRate', value: options.delete(:dissolution_rate) %>,
12
+ <%= component 'seo/schema/property', property: 'diversityPolicy', value: options.delete(:diversity_policy) %>,
13
+ <%= component 'seo/schema/property', property: 'duns', value: options.delete(:duns) %>,
14
+ <%= component 'seo/schema/property', property: 'email', value: options.delete(:email) %>,
15
+ <%= component 'seo/schema/property', property: 'employee', value: options.delete(:employee) %>,
16
+ <%= component 'seo/schema/property', property: 'ethicsPolicy', value: options.delete(:ethics_policy) %>,
17
+ <%= component 'seo/schema/property', property: 'event', value: options.delete(:event) %>,
18
+ <%= component 'seo/schema/property', property: 'faxNumber', value: options.delete(:fax_number) %>,
19
+ <%= component 'seo/schema/property', property: 'founder', value: options.delete(:founder) %>,
20
+ <%= component 'seo/schema/property', property: 'foundingDate', value: options.delete(:founding_date) %>,
21
+ <%= component 'seo/schema/property', property: 'foundingLocation', value: options.delete(:founding_location) %>,
22
+ <%= component 'seo/schema/property', property: 'funder', value: options.delete(:funder) %>,
23
+ <%= component 'seo/schema/property', property: 'globalLocationNumber', value: options.delete(:global_location_number) %>,
24
+ <%= component 'seo/schema/property', property: 'hasOfferCatalog', value: options.delete(:has_offer_catalog) %>,
25
+ <%= component 'seo/schema/property', property: 'hasPOS', value: options.delete(:has_pos) %>,
26
+ <%= component 'seo/schema/property', property: 'isicV4', value: options.delete(:isic_v4) %>,
27
+ <%= component 'seo/schema/property', property: 'legalName', value: options.delete(:legal_name) %>,
28
+ <%= component 'seo/schema/property', property: 'leiCode', value: options.delete(:lei_code) %>,
29
+ <%= component 'seo/schema/property', property: 'location', value: options.delete(:location) %>,
30
+ <%= component 'seo/schema/property', property: 'logo', value: options.delete(:logo) %>,
31
+ <%= component 'seo/schema/property', property: 'makesOffer', value: options.delete(:makesOffer) %>,
32
+ <%= component 'seo/schema/property', property: 'member', value: options.delete(:member) %>,
33
+ <%= component 'seo/schema/property', property: 'memberOf', value: options.delete(:memberOf) %>,
34
+ <%= component 'seo/schema/property', property: 'naics', value: options.delete(:naics) %>,
35
+ <%= component 'seo/schema/property', property: 'numberOfEmployees', value: options.delete(:number_of_employees) %>,
36
+ <%= component 'seo/schema/property', property: 'owns', value: options.delete(:owns) %>,
37
+ <%= component 'seo/schema/property', property: 'parentOrganization', value: options.delete(:parent_organization) %>,
38
+ <%= component 'seo/schema/property', property: 'publishingPrinciples', value: options.delete(:publishing_principles) %>,
39
+ <%= component 'seo/schema/property', property: 'review', value: options.delete(:review) %>,
40
+ <%= component 'seo/schema/property', property: 'seeks', value: options.delete(:seeks) %>,
41
+ <%= component 'seo/schema/property', property: 'sponsor', value: options.delete(:sponsor) %>,
42
+ <%= component 'seo/schema/property', property: 'subOrganization', value: options.delete(:sub_organization) %>,
43
+ <%= component 'seo/schema/property', property: 'taxID', value: options.delete(:tax_id) %>,
44
+ <%= component 'seo/schema/property', property: 'telephone', value: options.delete(:telephone) %>,
45
+ <%= component 'seo/schema/property', property: 'unnamedSourcesPolicy', value: options.delete(:unnamed_sources_policy) %>,
46
+ <%= component 'seo/schema/property', property: 'vatID', value: options.delete(:vat_id) %>,
47
+
48
+ <%= component 'seo/schema/types/thing', options %>
@@ -0,0 +1,54 @@
1
+ <%= component 'seo/schema/property', property: 'additionalName', value: options.delete(:additional_name) %>,
2
+ <%= component 'seo/schema/property', property: 'address', value: options.delete(:address) %>,
3
+ <%= component 'seo/schema/property', property: 'affiliation', value: options.delete(:affiliation) %>,
4
+ <%= component 'seo/schema/property', property: 'alumniOf', value: options.delete(:alumni_of) %>,
5
+ <%= component 'seo/schema/property', property: 'award', value: options.delete(:award) %>,
6
+ <%= component 'seo/schema/property', property: 'birthDate', value: options.delete(:birth_date) %>,
7
+ <%= component 'seo/schema/property', property: 'birthPlace', value: options.delete(:birth_place) %>,
8
+ <%= component 'seo/schema/property', property: 'brand', value: options.delete(:brand) %>,
9
+ <%= component 'seo/schema/property', property: 'children', value: options.delete(:children) %>,
10
+ <%= component 'seo/schema/property', property: 'colleague', value: options.delete(:colleague) %>,
11
+ <%= component 'seo/schema/property', property: 'contactPoint', value: options.delete(:contact_point) %>,
12
+ <%= component 'seo/schema/property', property: 'deathDate', value: options.delete(:death_date) %>,
13
+ <%= component 'seo/schema/property', property: 'deathPlace', value: options.delete(:death_place) %>,
14
+ <%= component 'seo/schema/property', property: 'duns', value: options.delete(:duns) %>,
15
+ <%= component 'seo/schema/property', property: 'email', value: options.delete(:email) %>,
16
+ <%= component 'seo/schema/property', property: 'familyName', value: options.delete(:family_name) %>,
17
+ <%= component 'seo/schema/property', property: 'faxNumber', value: options.delete(:fax_number) %>,
18
+ <%= component 'seo/schema/property', property: 'follows', value: options.delete(:follows) %>,
19
+ <%= component 'seo/schema/property', property: 'funder', value: options.delete(:funder) %>,
20
+ <%= component 'seo/schema/property', property: 'gender', value: options.delete(:gender) %>,
21
+ <%= component 'seo/schema/property', property: 'givenName', value: options.delete(:given_name) %>,
22
+ <%= component 'seo/schema/property', property: 'globalLocationNumber', value: options.delete(:global_location_number) %>,
23
+ <%= component 'seo/schema/property', property: 'hasOccupation', value: options.delete(:has_occupation) %>,
24
+ <%= component 'seo/schema/property', property: 'hasOfferCatalog', value: options.delete(:has_offer_catalog) %>,
25
+ <%= component 'seo/schema/property', property: 'hasPOS', value: options.delete(:has_pos) %>,
26
+ <%= component 'seo/schema/property', property: 'height', value: options.delete(:height) %>,
27
+ <%= component 'seo/schema/property', property: 'homeLocation', value: options.delete(:home_location) %>,
28
+ <%= component 'seo/schema/property', property: 'honorificPrefix', value: options.delete(:honorific_prefix) %>,
29
+ <%= component 'seo/schema/property', property: 'honorificSuffix', value: options.delete(:honorific_suffix) %>,
30
+ <%= component 'seo/schema/property', property: 'isicV4', value: options.delete(:isic_v4) %>,
31
+ <%= component 'seo/schema/property', property: 'jobTitle', value: options.delete(:job_title) %>,
32
+ <%= component 'seo/schema/property', property: 'knows', value: options.delete(:knows) %>,
33
+ <%= component 'seo/schema/property', property: 'makesOffer', value: options.delete(:makes_offer) %>,
34
+ <%= component 'seo/schema/property', property: 'memberOf', value: options.delete(:memberOf) %>,
35
+ <%= component 'seo/schema/property', property: 'naics', value: options.delete(:naics) %>,
36
+ <%= component 'seo/schema/property', property: 'nationality', value: options.delete(:nationality) %>,
37
+ <%= component 'seo/schema/property', property: 'netWorth', value: options.delete(:net_worth) %>,
38
+ <%= component 'seo/schema/property', property: 'owns', value: options.delete(:owns) %>,
39
+ <%= component 'seo/schema/property', property: 'parent', value: options.delete(:parent) %>,
40
+ <%= component 'seo/schema/property', property: 'performerIn', value: options.delete(:performer_in) %>,
41
+ <%= component 'seo/schema/property', property: 'publishingPrinciples', value: options.delete(:publishing_principles) %>,
42
+ <%= component 'seo/schema/property', property: 'relatedTo', value: options.delete(:related_to) %>,
43
+ <%= component 'seo/schema/property', property: 'seeks', value: options.delete(:seeks) %>,
44
+ <%= component 'seo/schema/property', property: 'sibling', value: options.delete(:sibling) %>,
45
+ <%= component 'seo/schema/property', property: 'sponsor', value: options.delete(:sponsor) %>,
46
+ <%= component 'seo/schema/property', property: 'spouse', value: options.delete(:spouse) %>,
47
+ <%= component 'seo/schema/property', property: 'taxID', value: options.delete(:tax_id) %>,
48
+ <%= component 'seo/schema/property', property: 'telephone', value: options.delete(:telephone) %>,
49
+ <%= component 'seo/schema/property', property: 'vatID', value: options.delete(:vat_id) %>,
50
+ <%= component 'seo/schema/property', property: 'weight', value: options.delete(:weight) %>,
51
+ <%= component 'seo/schema/property', property: 'workLocation', value: options.delete(:work_location) %>,
52
+ <%= component 'seo/schema/property', property: 'worksFor', value: options.delete(:works_for) %>,
53
+
54
+ <%= component 'seo/schema/types/thing', options %>
@@ -0,0 +1,7 @@
1
+ <%= component 'seo/schema/property', property: 'author', value: options.delete(:author) %>,
2
+ <%= component 'seo/schema/property', property: 'bestRating', value: options.delete(:best_rating) %>,
3
+ <%= component 'seo/schema/property', property: 'ratingValue', value: options.delete(:rating_value) %>,
4
+ <%= component 'seo/schema/property', property: 'reviewAspect', value: options.delete(:review_aspect) %>,
5
+ <%= component 'seo/schema/property', property: 'worstRating', value: options.delete(:worst_rating) %>,
6
+
7
+ <%= component 'seo/schema/types/intangible', options %>
@@ -0,0 +1,12 @@
1
+ <%= component 'seo/schema/property', property: 'additionalType', value: options.delete(:additional_type) %>,
2
+ <%= component 'seo/schema/property', property: 'additionalName', value: options.delete(:additional_name) %>,
3
+ <%= component 'seo/schema/property', property: 'description', value: options.delete(:description) %>,
4
+ <%= component 'seo/schema/property', property: 'disambiguatingDescription', value: options.delete(:disambiguating_description) %>,
5
+ <%= component 'seo/schema/property', property: 'identifier', value: options.delete(:identifier) %>,
6
+ <%= component 'seo/schema/property', property: 'image', value: options.delete(:image) %>,
7
+ <%= component 'seo/schema/property', property: 'mainEntityOfPage', value: options.delete(:main_entity_of_page) %>,
8
+ <%= component 'seo/schema/property', property: 'name', value: options.delete(:name) %>,
9
+ <%= component 'seo/schema/property', property: 'potentialAction', value: options.delete(:potential_action) %>,
10
+ <%= component 'seo/schema/property', property: 'sameAs', value: options.delete(:same_as) %>,
11
+ <%= component 'seo/schema/property', property: 'subjectOf', value: options.delete(:subject_of) %>,
12
+ <%= component 'seo/schema/property', property: 'url', value: options.delete(:url) %>
@@ -13,34 +13,18 @@ module SearchEngineOptimization
13
13
  false if options[:type].nil?
14
14
  end
15
15
 
16
- config.define_component 'seo/schema/aggregate_rating'
17
- config.define_component 'seo/schema/article'
18
- config.define_component 'seo/schema/organization'
19
- config.define_component 'seo/schema/person'
20
-
21
- config.define_component 'seo/schema/properties/articleBody' do |options|
22
- false if options[:article_body].nil?
23
- end
24
- config.define_component 'seo/schema/properties/articleSection' do |options|
25
- false if options[:article_section].nil?
26
- end
27
- config.define_component 'seo/schema/properties/datePublished' do |options|
28
- options[:date_published] = options[:date_published]&.iso8601
29
- false if options[:date_published].nil?
30
- end
31
- config.define_component 'seo/schema/properties/image' do |options|
32
- options[:image] = image_url options[:image] unless options[:image].nil? || options[:image].include?('http')
33
- false if options[:image].nil?
34
- end
35
- config.define_component 'seo/schema/properties/name' do |options|
36
- false if options[:name].nil?
37
- end
38
- config.define_component 'seo/schema/properties/ratingValue' do |options|
39
- false if options[:rating_value].nil?
40
- end
41
- config.define_component 'seo/schema/properties/url' do |options|
42
- false if options[:url].nil?
43
- end
16
+ config.define_component 'seo/schema/property'
17
+ config.define_component 'seo/schema/type'
18
+
19
+ config.define_component 'seo/schema/types/aggregate_rating'
20
+ config.define_component 'seo/schema/types/article'
21
+ config.define_component 'seo/schema/types/brand'
22
+ config.define_component 'seo/schema/types/creative_work'
23
+ config.define_component 'seo/schema/types/intangible'
24
+ config.define_component 'seo/schema/types/organization'
25
+ config.define_component 'seo/schema/types/person'
26
+ config.define_component 'seo/schema/types/rating'
27
+ config.define_component 'seo/schema/types/thing'
44
28
 
45
29
  end
46
30
  end
@@ -1,5 +1,5 @@
1
1
  module SearchEngineOptimization
2
2
 
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search-engine-optimization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
@@ -76,17 +76,17 @@ files:
76
76
  - LICENSE
77
77
  - README.md
78
78
  - app/views/mozaic/seo/_schema.html.erb
79
- - app/views/mozaic/seo/schema/_aggregate_rating.html.erb
80
- - app/views/mozaic/seo/schema/_article.html.erb
81
- - app/views/mozaic/seo/schema/_organization.html.erb
82
- - app/views/mozaic/seo/schema/_person.html.erb
83
- - app/views/mozaic/seo/schema/properties/_articleBody.html.erb
84
- - app/views/mozaic/seo/schema/properties/_articleSection.html.erb
85
- - app/views/mozaic/seo/schema/properties/_datePublished.html.erb
86
- - app/views/mozaic/seo/schema/properties/_image.html.erb
87
- - app/views/mozaic/seo/schema/properties/_name.html.erb
88
- - app/views/mozaic/seo/schema/properties/_ratingValue.html.erb
89
- - app/views/mozaic/seo/schema/properties/_url.html.erb
79
+ - app/views/mozaic/seo/schema/_property.html.erb
80
+ - app/views/mozaic/seo/schema/_type.html.erb
81
+ - app/views/mozaic/seo/schema/types/_aggregate_rating.html.erb
82
+ - app/views/mozaic/seo/schema/types/_article.html.erb
83
+ - app/views/mozaic/seo/schema/types/_brand.html.erb
84
+ - app/views/mozaic/seo/schema/types/_creative_work.html.erb
85
+ - app/views/mozaic/seo/schema/types/_intangible.html.erb
86
+ - app/views/mozaic/seo/schema/types/_organization.html.erb
87
+ - app/views/mozaic/seo/schema/types/_person.html.erb
88
+ - app/views/mozaic/seo/schema/types/_rating.html.erb
89
+ - app/views/mozaic/seo/schema/types/_thing.html.erb
90
90
  - lib/search-engine-optimization.rb
91
91
  - lib/search_engine_optimization/engine.rb
92
92
  - lib/search_engine_optimization/railtie.rb
@@ -1,3 +0,0 @@
1
- "@type" : "AggregateRating"
2
-
3
- <%= component 'seo/schema/properties/ratingValue', rating_value: options[:rating_value] %>
@@ -1,11 +0,0 @@
1
- "@type" : "Article",
2
- "aggregateRating" : { <%= component 'seo/schema/aggregate_rating', options[:aggregate_rating] %> },
3
- "author" : { <%= component 'seo/schema/person', options[:author] %> },
4
- "publisher" : { <%= component 'seo/schema/organization', options[:publisher] %> }
5
-
6
- <%= component 'seo/schema/properties/articleBody', article_body: options[:article_body] %>
7
- <%= component 'seo/schema/properties/articleSection', article_section: options[:article_section] %>
8
- <%= component 'seo/schema/properties/datePublished', date_published: options[:date_published] %>
9
- <%= component 'seo/schema/properties/image', image: options[:image] %>
10
- <%= component 'seo/schema/properties/name', name: options[:name] %>
11
- <%= component 'seo/schema/properties/url', url: options[:url] %>
@@ -1,3 +0,0 @@
1
- "@type" : "Organization"
2
-
3
- <%= component 'seo/schema/properties/name', name: options[:name] %>
@@ -1,3 +0,0 @@
1
- "@type" : "Person"
2
-
3
- <%= component 'seo/schema/properties/name', name: options[:name] %>
@@ -1 +0,0 @@
1
- , "articleBody": "<%= options[:article_body] %>"
@@ -1 +0,0 @@
1
- , "articleSection": "<%= options[:article_section] %>"
@@ -1 +0,0 @@
1
- , "datePublished": "<%= options[:date_published] %>"
@@ -1 +0,0 @@
1
- , "image": "<%= options[:image] %>"
@@ -1 +0,0 @@
1
- , "name": "<%= options[:name] %>"
@@ -1 +0,0 @@
1
- , "ratingValue": "<%= options[:rating_value] %>"
@@ -1 +0,0 @@
1
- , "url": "<%= options[:url] %>"