Skip to content

Commit

Permalink
Merge pull request #1 from kanopi/schema
Browse files Browse the repository at this point in the history
Create metatags for person
  • Loading branch information
taylorwillskanopi authored Apr 11, 2024
2 parents 9485ff4 + 8114719 commit b4d6e19
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 27 deletions.
105 changes: 82 additions & 23 deletions config/core.entity_form_display.node.sa_person.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ dependencies:
- field.field.node.sa_person.sa_headshot
- field.field.node.sa_person.sa_last_name
- field.field.node.sa_person.sa_phone
- field.field.node.sa_person.sa_robots
- field.field.node.sa_person.sa_seo_description
- field.field.node.sa_person.sa_seo_image
- field.field.node.sa_person.sa_seo_page_title
- field.field.node.sa_person.sa_social_media_links
- node.type.sa_person
module:
- address
- field_group
- link
- media_library
- media_library_edit
- path
- publication_date
- telephone
Expand All @@ -29,6 +34,7 @@ third_party_settings:
children:
- group_summary
- group_info
- group_advanced_seo
label: Administration
region: content
parent_name: ''
Expand Down Expand Up @@ -79,6 +85,26 @@ third_party_settings:
formatter: closed
description: ''
required_fields: true
group_advanced_seo:
children:
- sa_seo_page_title
- sa_seo_description
- sa_seo_image
- sa_robots
label: 'Advanced SEO'
region: content
parent_name: group_administration
weight: 22
format_type: tab
format_settings:
classes: ''
show_empty_fields: false
id: ''
formatter: closed
description: ''
required_fields: true
_core:
default_config_hash: l4U7fMh5GnaQEGJFmHtFE_GMqs--I3xwwYWzL3ZZUcM
id: node.sa_person.default
targetEntityType: node
bundle: sa_person
Expand All @@ -90,6 +116,30 @@ content:
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 7
region: content
settings: { }
third_party_settings: { }
publish_on:
type: datetime_timestamp
weight: 13
region: content
settings: { }
third_party_settings: { }
publish_state:
type: options_select
weight: 15
region: content
settings: { }
third_party_settings: { }
published_at:
type: publication_date_timestamp
weight: 9
region: content
settings: { }
third_party_settings: { }
sa_address:
type: address_default
weight: 12
Expand Down Expand Up @@ -168,37 +218,46 @@ content:
settings:
placeholder: ''
third_party_settings: { }
sa_social_media_links:
type: link_default
weight: 16
sa_robots:
type: string_textfield
weight: 11
region: content
settings:
placeholder_url: ''
placeholder_title: ''
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 7
sa_seo_description:
type: string_textarea
weight: 9
region: content
settings: { }
settings:
rows: 5
placeholder: ''
third_party_settings: { }
publish_on:
type: datetime_timestamp
sa_seo_image:
type: media_library_widget
weight: 10
region: content
settings: { }
third_party_settings: { }
publish_state:
type: options_select
weight: 11
settings:
media_types: { }
third_party_settings:
media_library_edit:
show_edit: '1'
sa_seo_page_title:
type: string_textfield
weight: 8
region: content
settings: { }
settings:
size: 60
placeholder: ''
third_party_settings: { }
published_at:
type: publication_date_timestamp
weight: 8
sa_social_media_links:
type: link_default
weight: 16
region: content
settings: { }
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
simple_sitemap:
weight: 6
Expand All @@ -207,7 +266,7 @@ content:
third_party_settings: { }
status:
type: boolean_checkbox
weight: 3
weight: 2
region: content
settings:
display_label: true
Expand All @@ -231,7 +290,7 @@ content:
placeholder: ''
third_party_settings: { }
url_redirects:
weight: 9
weight: 12
region: content
settings: { }
third_party_settings: { }
Expand Down
9 changes: 8 additions & 1 deletion config/core.entity_view_display.node.sa_person.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ dependencies:
- field.field.node.sa_person.sa_headshot
- field.field.node.sa_person.sa_last_name
- field.field.node.sa_person.sa_phone
- field.field.node.sa_person.sa_robots
- field.field.node.sa_person.sa_seo_description
- field.field.node.sa_person.sa_seo_image
- field.field.node.sa_person.sa_seo_page_title
- field.field.node.sa_person.sa_social_media_links
- node.type.sa_person
module:
- address
- element_class_formatter
- link
- text
- telephone
- user
id: node.sa_person.default
targetEntityType: node
Expand Down Expand Up @@ -120,3 +123,7 @@ content:
hidden:
links: true
published_at: true
sa_robots: true
sa_seo_description: true
sa_seo_image: true
sa_seo_page_title: true
12 changes: 10 additions & 2 deletions config/core.entity_view_display.node.sa_person.teaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ dependencies:
- field.field.node.sa_person.sa_headshot
- field.field.node.sa_person.sa_last_name
- field.field.node.sa_person.sa_phone
- field.field.node.sa_person.sa_robots
- field.field.node.sa_person.sa_seo_description
- field.field.node.sa_person.sa_seo_image
- field.field.node.sa_person.sa_seo_page_title
- field.field.node.sa_person.sa_social_media_links
- node.type.sa_person
module:
Expand Down Expand Up @@ -61,12 +65,16 @@ content:
weight: 2
region: content
hidden:
links: true
published_at: true
sa_address: true
sa_biography: true
sa_education: true
sa_email: true
sa_fax: true
sa_phone: true
sa_robots: true
sa_seo_description: true
sa_seo_image: true
sa_seo_page_title: true
sa_social_media_links: true
links: true
published_at: true
18 changes: 18 additions & 0 deletions config/field.field.node.sa_person.sa_robots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.sa_robots
- node.type.sa_person
id: node.sa_person.sa_robots
field_name: sa_robots
entity_type: node
bundle: sa_person
label: 'Robots meta tag'
description: "<p>Use this field to customize the Robots meta tag if needed. If you enter nothing here, the default <code>index, follow</code> is assumed.</p>\r\n\r\n<p>The robots meta tag lets you utilize a granular, page-specific approach to controlling how an individual page should be indexed and served to users in search results.</p>\r\n\r\n<p>Visit Google's <a href=\"https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#directives\">Valid indexing and serving rules</a> for a full list of options.</p>"
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
18 changes: 18 additions & 0 deletions config/field.field.node.sa_person.sa_seo_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.sa_seo_description
- node.type.sa_person
id: node.sa_person.sa_seo_description
field_name: sa_seo_description
entity_type: node
bundle: sa_person
label: 'SEO Description'
description: 'Use this field to overwrite the default description for SEO meta descriptions.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string_long
28 changes: 28 additions & 0 deletions config/field.field.node.sa_person.sa_seo_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.sa_seo_image
- media.type.image
- node.type.sa_person
id: node.sa_person.sa_seo_image
field_name: sa_seo_image
entity_type: node
bundle: sa_person
label: 'SEO Image'
description: 'Use this field to overwrite the default image for SEO meta tags.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
image: image
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: field_media_image
field_type: entity_reference
18 changes: 18 additions & 0 deletions config/field.field.node.sa_person.sa_seo_page_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.sa_seo_page_title
- node.type.sa_person
id: node.sa_person.sa_seo_page_title
field_name: sa_seo_page_title
entity_type: node
bundle: sa_person
label: 'SEO Page Title'
description: 'Use this field to overwrite the default HTML page title for SEO.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
47 changes: 47 additions & 0 deletions config/metatag.metatag_defaults.node__sa_person.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
langcode: en
status: true
dependencies: { }
id: node__sa_person
label: 'Content: Person'
tags:
canonical_url: '[site:url]'
description: '[node:sa_seo_description|node:sa_biography]'
image_src: '[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook|node:sa_headshot:entity:field_media_image:sa_social_media_facebook]'
og_country_name: '[node:sa_address:country_name]'
og_description: '[node:sa_seo_description|node:sa_biography]'
og_email: '[node:sa_email]'
og_fax_number: '[node:sa_fax]'
og_image: '[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook|node:sa_headshot:entity:field_media_image:sa_social_media_facebook]'
og_image_alt: '[node:sa_seo_image:entity:field_media_image:alt|node:sa_headshot:entity:field_media_image:alt]'
og_image_height: '[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook:height|node:sa_headshot:entity:field_media_image:sa_social_media_facebook:height]'
og_image_type: '[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook:mimetype|node:sa_headshot:entity:field_media_image:sa_social_media_facebook:mimetype]'
og_image_width: '[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook:width|node:sa_headshot:entity:field_media_image:sa_social_media_facebook:width]'
og_locale: en_US
og_locality: '[node:sa_address:locality]'
og_phone_number: '[node:sa_phone]'
og_postal_code: '[node:sa_address:postal_code]'
og_site_name: '[site:name]'
og_street_address: '[node:sa_address:address_line1]'
og_title: '[node:sa_seo_page_title|node:title]'
og_type: website
og_updated_time: '[node:changed:custom:c]'
og_url: '[current-page:url:absolute]'
profile_first_name: '[node:sa_first_name]'
profile_last_name: '[node:sa_last_name]'
rights: 'Copyright ©[date:html_year] All rights reserved.'
schema_person_address: 'a:5:{s:5:"@type";s:13:"PostalAddress";s:13:"streetAddress";s:31:"[node:sa_address:address_line1]";s:15:"addressLocality";s:26:"[node:sa_address:locality]";s:10:"postalCode";s:30:"[node:sa_address:sorting_code]";s:14:"addressCountry";s:30:"[node:sa_address:country_code]";}'
schema_person_description: '[node:sa_biography|node:sa_seo_description]'
schema_person_email: '[node:sa_email]'
schema_person_family_name: '[node:sa_last_name]'
schema_person_given_name: '[node:sa_first_name]'
schema_person_image: 'a:5:{s:5:"@type";s:11:"ImageObject";s:20:"representativeOfPage";s:4:"True";s:3:"url";s:58:"[node:sa_seo_image:entity:url|node:sa_headshot:entity:url]";s:5:"width";s:148:"[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook:width|node:sa_headshot:entity:field_media_image:sa_social_media_facebook:width]";s:6:"height";s:150:"[node:sa_seo_image:entity:field_media_image:sa_social_media_facebook:height|node:sa_headshot:entity:field_media_image:sa_social_media_facebook:height]";}'
schema_person_name: '[node:sa_first_name]'
schema_person_same_as: '[node:sa_social_media_links]'
schema_person_telephone: '[node:sa_phone]'
schema_person_type: Person
title: '[node:sa_seo_page_title|node:title] | [site:name]'
twitter_cards_description: '[node:sa_seo_description|node:sa_biography]'
twitter_cards_image: '[node:sa_seo_image:entity:field_media_image:sa_social_media_x:url|node:sa_headshot:entity:field_media_image:sa_social_media_x:url]'
twitter_cards_image_alt: '[node:sa_seo_image:entity:field_media_image:alt|node:sa_headshot:entity:field_media_image:alt]'
twitter_cards_title: '[node:sa_seo_page_title|node:title]'
twitter_cards_type: summary_large_image
21 changes: 21 additions & 0 deletions config/metatag.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
entity_type_groups:
node:
sa_person:
basic: basic
advanced: advanced
open_graph: open_graph
twitter_cards: twitter_cards
schema_person: schema_person
separator: ','
tag_trim_method: beforeValue
use_maxlength: true
tag_trim_maxlength:
metatag_maxlength_title: null
metatag_maxlength_description: null
metatag_maxlength_abstract: null
metatag_maxlength_og_site_name: null
metatag_maxlength_og_title: null
metatag_maxlength_og_description: null
metatag_maxlength_twitter_cards_description: null
metatag_maxlength_twitter_cards_title: null
tag_scroll_max_height: ''
2 changes: 1 addition & 1 deletion recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: 'Site'
install:
# Contrib.
- address
- schema_event
- schema_person
- telephone
config:
actions:
Expand Down

0 comments on commit b4d6e19

Please sign in to comment.