github unjs/unhead v1.1.28

latest releases: v2.0.0-alpha.19, v2.0.0-alpha.18, v2.0.0-alpha.17...
20 months ago

Notable Changes

Title / TitleTemplate Tag Priority (3807766), closes #165

For parity with how the tag priority works for other tags, you can now set a tag priority for title and title template.

useHead({
  title: {
    textContent: 'high-priority title',
    tagPriority: 'high',
  },
})
// ...
useHead({
  title: 'new title'
})
// ...
// title will be "high-priortiy title"

useSeoMeta themeColor (75fd20d)

You can now provide themeColor as an object or an array of objects with the media key. This allows you to provide different themes depending on the device and user preferences.

useSeoMeta({
  themeColor: [
    { content: 'cyan', media: '(prefers-color-scheme: light)' },
    { content: 'black', media: '(prefers-color-scheme: dark)' },
  ],
})

🐛 Bug Fixes

  • addons: avoid transforming useSeoMeta with spread operator (3bca93d), closes #159
  • unhead: avoid deduping tags with higher priority (234bcfb)
  • unhead: sorting tag alias offset relative (e2f51b4)
  • useHeadSafe: allow relative href (c6385c3), closes #162

Don't miss a new unhead release

NewReleases is sending notifications on new releases.