TypeScript
You're viewing Unhead v3 beta documentation. Install with unhead@beta
Schema

Music Group

Schema.org MusicGroup

Type: defineMusicGroup(input?: MusicGroup)

Describes a band or musical group.

Required properties

  • name string
    The name of the band/musical group.
  • member NodeRelations<Person | string>
    Array of band members. Resolves to Person.
  • genre string | string[]
    The genre(s) of music the group performs.
  • album NodeRelations<MusicAlbum>
    Array of albums by the group.

Defaults

  • @type: MusicGroup
  • @id: ${canonicalHost}#music-group
  • url: options.canonicalHost

Examples

Minimal

defineMusicGroup({
  name: 'The Beatles',
})

Complete

defineMusicGroup({
  name: 'The Beatles',
  description: 'English rock band formed in Liverpool in 1960',
  url: 'https://example.com/artists/the-beatles',
  genre: ['Rock', 'Pop'],
  member: [
    { name: 'John Lennon' },
    { name: 'Paul McCartney' },
    { name: 'George Harrison' },
    { name: 'Ringo Starr' },
  ],
  foundingDate: new Date(1960, 7, 1),
  dissolutionDate: new Date(1970, 3, 10),
  album: [
    { name: 'Abbey Road' },
    { name: 'Sgt. Pepper\'s Lonely Hearts Club Band' },
  ],
  image: 'https://example.com/artists/the-beatles.jpg',
  sameAs: [
    'https://www.facebook.com/thebeatles',
    'https://twitter.com/thebeatles',
  ],
})

Types

export interface MusicGroupSimple extends Thing {
  name: string
  description?: string
  url?: string
  genre?: string | string[]
  member?: NodeRelations<Person | string>
  foundingDate?: ResolvableDate
  dissolutionDate?: ResolvableDate
  album?: NodeRelations<string>
  track?: NodeRelations<string>
  image?: NodeRelations<string | ImageObject>
  sameAs?: Arrayable<string>
}
Did this page help you?