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_course Using the az_seo Module #3905

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

Set schema_metatag Defaults for az_course Using the az_seo Module #3905

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 to course pages to improve their discoverability and accurate representation in search engines. By including detailed information about courses, search engines can present richer results for users looking for educational opportunities.

The relevant schema type is Course, which can be used to describe individual course pages.

Additional guidance: Google Search Documentation on Course Structured Data.

Example JSON-LD output:

Course

Can be used on a page with single course information
https://developers.google.com/search/docs/appearance/structured-data/course
https://schema.org/Course

<script type="application/ld+json">
{
	"@context": "https://schema.org/",
	"@type": "Course",
	"name": "{{Name of course}}",
	"description": "{{Description of course. char 240 - 500}}",
	"url":"{{URL}}",
	"provider": {
		"@type": "CollegeOrUniversity",
		"name": "University of Arizona {{Department/College}}",
		"url": "{{Department/College url}}",
		"address": {
			"@type": "PostalAddress",
			"streetAddress": "{{Street Address}}",
			"addressLocality": "{{City}}",
			"addressRegion": "{{2 letter state abbreviation}}",
			"postalCode": "{{5 digits}}",
			"addressCountry": "{{Country abbreviation}}"
		},
		"parentOrganization": {
			"@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"
			}
		}
	},
	"offers": [{
		"@type": "Offer",
		"category": "{{Paid/Free/Partially Free/Subscription}}",
		"priceCurrency": "USD"
	}],
	"hasCourseInstance": [{
		"@type": "CourseInstance",
		"courseMode": "{{Online/Onsite/Blended/Synchronous/Asynchronous/Full-Time/Part-Time}}",
		"location": "{{On Campus/Online}}",
		"courseSchedule": {
			"@type": "Schedule",
			"repeatCount": {{Integer - total times the class meets}},
			"repeatFrequency": "{{Daily/Weekly/Monthly}}",
			"startDate": "{{YYYY-MM-DD}}",
			"endDate": "{{YYYY-MM-DD}}"
		}
	}]
}
</script>

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

Course pages currently lack schema.org Course metatags. This means they are not optimized for bots and search engines, potentially affecting how they are consumed and displayed.


Proposed Resolution

Describe the Solution You’d Like

  • Add schema.org Course metatag defaults to az_course using the az_seo module and the schema_course module.
  • Populate schema.org fields dynamically with data from az_course nodes.
    • Example mappings:
      • name: Map to the course name field.
      • description: Map to the course description field, truncated to 240–500 characters if needed.
      • url: Map to the canonical URL of the course node.
      • provider.name: Map to the department or college name field.
      • provider.url: Map to the department or college URL field.
      • provider.address: Map to the department's address fields or use static defaults.
      • offers.category: Map to a course offering category field (Paid, Free, etc.).
      • hasCourseInstance: Use fields to describe course modes, locations, schedules, and durations.

Describe Alternatives You’ve Considered

  • Using custom templates for JSON-LD output directly within course page templates. However, this approach would reduce flexibility and reuse compared to using the schema_metatag module.

Roles and Permissions Considerations

Anonymous User

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

Authenticated User

  • No impact.

Content Editor

  • Gains the ability to review and modify the fields populating schema.org metatags for az_course nodes through the UI.

Content Administrator

  • Gains the ability to manage and configure schema.org defaults for az_course nodes through the az_seo module settings.

Administrator

  • Gains full control over enabling/disabling schema.org metatag functionality for az_course nodes site-wide.

Additional Context


Conditions of Satisfaction

  • Add schema.org Course metatag defaults to az_course using the az_seo module and the schema_course module.
  • Metatag fields map dynamically to data in az_course nodes (e.g., name, description, provider details, offers, and instances).
  • The generated JSON-LD matches the schema.org Course specification.
  • Permissions are configured to allow appropriate roles to manage schema metatags.

Next Steps

  1. Implement schema defaults in az_seo.
  2. Test schema output on az_course nodes.
  3. Document any configuration or editing instructions for site administrators and content editors.
@trackleft trackleft changed the title Set Schema Metatag Defaults for az_course Using the az_seo Module Set schema_m_etatag Defaults for az_course Using the az_seo Module Nov 21, 2024
@trackleft trackleft changed the title Set schema_m_etatag Defaults for az_course Using the az_seo Module Set schema_metatag Defaults for az_course Using the az_seo Module Nov 21, 2024
@trackleft trackleft added the good first issue Good for newcomers label 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 editor experience Improvements to the editor experience for individuals editing Quickstart websites enhancement New feature or request 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