Index of every page on this site: llms.txt
TypeScript
Schema

Course Schema

Schema.org Course

  • Type: defineCourse<T extends Record<string, any>>(input?: Course & T)
    Describes a Course.

The fields below cover Google's Course list feature and the fields used by Unhead's resolver. They do not cover every property on schema.org/Course. Other valid properties, such as coursePrerequisites, pass through to the generated JSON-LD. Use a custom node with schema-dts when you need full Schema.org typing.

Examples

defineCourse({
  name: 'Introduction to Computer Science and Programming',
  description: 'Introductory CS course laying out the basics.',
  provider: {
    name: 'University of Technology - Eureka',
    sameAs: 'http://www.ut-eureka.edu',
  },
})

For Google's course list feature, mark up at least three courses and add the required ItemList carousel properties. Each Course needs name and description, together with valid provider information.

Defaults and resolves

  • @type defaults to Course.
  • A root Course receives an ID such as ${canonicalUrl}#/schema/course/{n}.
  • provider is resolved as a root Organization. When it is omitted, Unhead references the primary identity if one exists.

Types

/**
 * A course or class offered by an educational institution.
 */
export interface CourseSimple extends Thing {
  /**
   * The title of the course.
   */
  name: string
  /**
   * A description of the course. Display limit of 60 characters.
   */
  description: string
  /**
   * The course code or identifier.
   */
  courseCode?: string
  /**
   * The educational level of the course.
   */
  educationalLevel?: string
  /**
   * The duration of the course.
   */
  timeRequired?: string
  /**
   * A reference to an Organization piece, representing the organization offering the course.
   */
  provider?: NodeRelation<Organization>
}
Did this page help you?