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

Set schema_metatag defaults for az_news using the az_seo module. #3908

Open
3 tasks
trackleft opened this issue Nov 21, 2024 · 0 comments · Fixed by #3909
Open
3 tasks

Set schema_metatag defaults for az_news using the az_seo module. #3908

trackleft opened this issue Nov 21, 2024 · 0 comments · Fixed by #3909
Labels
editor experience Improvements to the editor experience for individuals editing Quickstart websites enhancement New feature or request

Comments

@trackleft
Copy link
Member

trackleft commented Nov 21, 2024

Motivation

Schema.org recommends adding structured data for news articles to improve their visibility in search engines and enhance their representation in search results. The relevant schema type is NewsArticle, which is suitable for pages containing news stories or news-like article content.

Additional guidance: Google Search Documentation on NewsArticle Structured Data.

Example JSON-LD output:

<script type="application/ld+json">
{
	"@context": "https://schema.org",
	"@type": "NewsArticle",
	"headline": "{{Title of a News Article}}",
	"url": "{{URL for the article}}",
	"image": [
		"{{url for image 1}}",
		"{{url for image 2}}",
		"{{url for image 3}}",
		"{{url for image n}}"
	],
	"datePublished": "{{YYYY-MM-DDTHH:MM:SS+00:00}}",
	"dateModified": "{{YYYY-MM-DDTHH:MM:SS+00:00}}",
	"author": [{
			"@type": "Person",
			"name": "{{First Name Last Name}}",
			"url": "{{Profile URL}}"
		},{
			"@type": "Person",
			"name": "{{First Name Last Name can have multiple authors}}",
			"url": "{{Profile URL}}"
	}],
	"publisher":{
		"@type": "EducationalOrganization",
		"name": "University of Arizona",
		"url": "https://www.arizona.edu/",
		"address": {
			"@type": "PostalAddress",
			"streetAddress": "1401 E University Blvd",
			"addressLocality": "Tucson",
			"addressRegion": "AZ",
			"postalCode": "85721",
			"addressCountry": "US"
		}
	}
}
</script>

Proposed Resolution

Describe the Solution You’d Like

  • Add a new plugin/submodule to the schema_metatag module for supporting the NewsArticle schema type.
  • Configure default values for the following schema.org fields:
    • headline: Map to the title of the article.
    • url: Map to the canonical URL of the article.
    • image: Map to the featured image(s) associated with the article.
    • datePublished: Map to the article's publish date.
    • dateModified: Map to the article's last updated date.
    • author.name: Map to the author(s) of the article.
    • author.url: Map to the profile URL of the author(s) (if available).
    • publisher.name: Default to "University of Arizona".
    • publisher.url: Default to "https://www.arizona.edu".
    • publisher.address: Use the static address for the University of Arizona.

Is your feature request related to a problem? Please describe.

Currently, pages containing news articles lack structured data, which limits their visibility and optimization in search engines. Adding NewsArticle schema will improve their discoverability and allow for richer search engine results.


Roles and Permissions Considerations

Anonymous User

  • No impact: Schema metatags are not user-editable and only impact metadata.

Authenticated User

  • No impact.

Content Editor

  • Gains the ability to review and verify structured data output for news articles through the UI.

Content Administrator

  • Gains the ability to configure and manage schema.org settings for news articles using the new schema_metatag plugin.

Administrator

  • Gains full control over enabling/disabling the NewsArticle schema metatag functionality site-wide.

Additional Context


Conditions of Satisfaction

  • Default mappings for NewsArticle fields are configured based on article metadata.
  • JSON-LD output matches schema.org specifications for NewsArticle.
  • Permissions are configured appropriately for managing the new plugin settings.

Next Steps

  1. Enable the schema_article module
  2. Configure field mappings for NewsArticle schema defaults.
  3. Test JSON-LD output for validation against schema.org and G
@trackleft trackleft changed the title Add new plugin for schema_metatag to add News Article schema.org metatag and set default values. Add News Article schema.org metatags default values. Nov 21, 2024
@trackleft trackleft changed the title Add News Article schema.org metatags default values. Set schema_metatag defaults for az_news using the az_seo module. Nov 21, 2024
@trackleft trackleft linked a pull request Nov 21, 2024 that will close this issue
32 tasks
@mrbeiley mrbeiley reopened this Nov 22, 2024
@mrbeiley mrbeiley linked a pull request Nov 22, 2024 that will close this issue
32 tasks
@trackleft trackleft added good first issue Good for newcomers enhancement New feature or request editor experience Improvements to the editor experience for individuals editing Quickstart websites labels Nov 22, 2024
@BaoNguyen09 BaoNguyen09 removed the good first issue Good for newcomers label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor experience Improvements to the editor experience for individuals editing Quickstart websites enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants