Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
<svelte:head> title tag order not respected | GoodFirstPicks

<svelte:head> title tag order not respected

sveltejs/svelte 3 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeSvelteTypeScript

Why this is a good first issue

The issue involves special handling of title tags in Svelte's head management.

AI Summary

The issue reports that the title tag order within svelte:head is not respected, potentially affecting performance metrics like FCP. It requires understanding how Svelte handles title tags differently from other head elements. The maintainer's comment indicates this is a known special case, suggesting the solution may involve non-trivial changes to head management.

Issue Description

Describe the bug

I’ve been optimising the svelte:head tag order using Capo.js, but I’ve noticed that the tag does not match the order in which it is defined within the svelte:head block.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-yx2a2yb4?file=src%2Froutes%2F%2Blayout.svelte

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/adapter-auto: ^4.0.0 => 4.0.0 
    @sveltejs/kit: ^2.16.0 => 2.20.5 
    @sveltejs/vite-plugin-svelte: ^5.0.0 => 5.0.3 
    svelte: ^5.25.0 => 5.25.10 
    vite: ^6.2.5 => 6.2.5

Severity

annoyance

Additional Information

  • https://unhead.unjs.io/docs/head/guides/core-concepts/positions#sort-order
  • https://github.com/unjs/unhead/blob/51afb7e2c488aff8058cfa841c4c634888ee7281/packages/unhead/src/utils/sort.t

GitHub Labels

awaiting submitter

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • requires understanding of head tag handling
  • potential performance implications
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno