Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema.org Metatag "CollegeOrUniversity" issue/3644 #3743

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: az_quickstart
recipe: drupal10
config:
php: '8.3'
php: '8.2'
via: apache:2.4
webroot: web
database: mariadb:10.6
Expand Down Expand Up @@ -47,7 +47,7 @@ services:
- composer install
- ln -s /usr/local/quickstart-install-profile/.vscode /app/.vscode
node:
type: node:20
type: node:18
build:
- yarn install
chromedriver:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# The 'type' should be "label" for short meta tags and "text" for ones which
# could get longer, especially ones which use a textarea field instead of a
# textfield.

metatag.metatag_tag.schema_college_or_university_address:
type: text
label: 'address'
metatag.metatag_tag.schema_college_or_university_description:
type: text
label: 'description'
metatag.metatag_tag.schema_college_or_university_id:
type: text
label: '@id'
metatag.metatag_tag.schema_college_or_university_image:
type: text
label: 'image'
metatag.metatag_tag.schema_college_or_university_logo:
type: text
label: 'logo'
metatag.metatag_tag.schema_college_or_university_name:
type: text
label: 'name'
metatag.metatag_tag.schema_college_or_university_same_as:
type: text
label: 'sameAs'
metatag.metatag_tag.schema_college_or_university_telephone:
type: text
label: 'telephone'
metatag.metatag_tag.schema_college_or_university_email:
type: text
label: 'email'
metatag.metatag_tag.schema_college_or_university_type:
type: string
label: '@type'
metatag.metatag_tag.schema_college_or_university_url:
type: text
label: 'url'
metatag.metatag_tag.schema_college_or_university_parent_organization:
type: text
label: 'parentOrganization'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Schema.org CollegeOrUniversity Final
type: module
description: 'Adds Schema.org/CollegeOrUniversity to the JSON LD array.'
core_version_requirement: ^9 || ^10 || ^11
package: SEO
dependencies:
- schema_metatag:schema_metatag
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

/**
* @file
* Contains schema_college_or_university.module.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Group;

use Drupal\schema_metatag\Plugin\metatag\Group\SchemaGroupBase;

/**
* Provides a plugin for the 'CollegeOrUniversity' meta tag group.
*
* @MetatagGroup(
* id = "schema_college_or_university",
* label = @Translation("Schema.org: CollegeOrUniversity"),
* description = @Translation("See Schema.org definitions for this Schema type at <a href="":url"">:url</a>. Also see <a href="":url2"">Google's requirements</a>.", arguments = {
* ":url" = "https://schema.org/CollegeOrUniversity",
* ":url2" = "https://developers.google.com/search/docs/data-types/local-business",
* }),
* weight = 10,
* )
*/
class SchemaCollegeOrUniversity extends SchemaGroupBase {
// Nothing here yet. Just a placeholder class for a plugin.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_address' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_address",
* label = @Translation("address"),
* description = @Translation("REQUIRED BY GOOGLE. The address of the college_or_university."),
* name = "address",
* group = "schema_college_or_university",
* weight = 10,
* type = "string",
* secure = FALSE,
* multiple = FALSE,
* property_type = "postal_address",
* tree_parent = {
* "PostalAddress",
* },
* tree_depth = 0,
* )
*/
class SchemaCollegeOrUniversityAddress extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_description' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_description",
* label = @Translation("description"),
* description = @Translation("RECOMMENDED BY GOOGLE. A description of the item."),
* name = "description",
* group = "schema_college_or_university",
* weight = 1,
* type = "label",
* secure = FALSE,
* multiple = FALSE,
* property_type = "text",
* tree_parent = {},
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversityDescription extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_email' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_email",
* label = @Translation("email"),
* description = @Translation("RECOMMENDED BY GOOGLE."),
* name = "email",
* group = "schema_college_or_university",
* weight = 1.2,
* type = "string",
* secure = FALSE,
* multiple = FALSE,
* property_type = "text",
* tree_parent = {},
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversityEmail extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_id' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_id",
* label = @Translation("@id"),
* description = @Translation("REQUIRED BY GOOGLE. Globally unique @id, usually a url, used to to link other properties to this object."),
* name = "@id",
* group = "schema_college_or_university",
* weight = -1,
* type = "string",
* secure = FALSE,
* multiple = FALSE,
* property_type = "text",
* tree_parent = {},
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversityId extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaImageObjectBase;

/**
* Provides a plugin for the 'image' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_image",
* label = @Translation("image"),
* description = @Translation("The primary image for this item."),
* name = "image",
* group = "schema_college_or_university",
* weight = 3,
* type = "image",
* secure = FALSE,
* multiple = FALSE,
* property_type = "image_object",
* tree_parent = {
* "ImageObject",
* },
* tree_depth = 0,
* )
*/
class SchemaCollegeOrUniversityImage extends SchemaImageObjectBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaImageObjectBase;

/**
* Provides a plugin for the 'logo' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_logo",
* label = @Translation("logo"),
* description = @Translation("The logo for this college_or_university."),
* name = "logo",
* group = "schema_college_or_university",
* weight = 3,
* type = "image",
* secure = FALSE,
* multiple = FALSE,
* property_type = "image_object",
* tree_parent = {
* "ImageObject",
* },
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversityLogo extends SchemaImageObjectBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_name' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_name",
* label = @Translation("name"),
* description = @Translation("REQUIRED BY GOOGLE. The name of the college_or_university."),
* name = "name",
* group = "schema_college_or_university",
* weight = 1,
* type = "string",
* secure = FALSE,
* multiple = FALSE,
* property_type = "text",
* tree_parent = {},
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversityName extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_parent_organization' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_parent_organization",
* label = @Translation("parentOrganization"),
* description = @Translation("An Organization (or ProgramMembership) to which this Organization belongs."),
* name = "parentOrganization",
* group = "schema_college_or_university",
* weight = 10,
* type = "string",
* secure = FALSE,
* multiple = TRUE,
* property_type = "program_membership",
* tree_parent = {
* "ProgramMembership",
* },
* tree_depth = 0,
* )
*/
class SchemaCollegeOrUniversityParentOrganization extends SchemaNameBase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Drupal\schema_college_or_university\Plugin\metatag\Tag;

use Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase;

/**
* Provides a plugin for the 'schema_college_or_university_same_as' meta tag.
*
* - 'id' should be a globally unique id.
* - 'name' should match the Schema.org element name.
* - 'group' should match the id of the group that defines the Schema.org type.
*
* @MetatagTag(
* id = "schema_college_or_university_same_as",
* label = @Translation("sameAs"),
* description = @Translation("Url linked to the web site, such as wikipedia page or social profiles."),
* name = "sameAs",
* group = "schema_college_or_university",
* weight = 1,
* type = "string",
* secure = FALSE,
* multiple = TRUE,
* property_type = "url",
* tree_parent = {},
* tree_depth = -1,
* )
*/
class SchemaCollegeOrUniversitySameAs extends SchemaNameBase {

}
Loading
Loading