Skip to content

Commit

Permalink
Merge pull request #320 from jakemulley/fix-page-title
Browse files Browse the repository at this point in the history
Fix <title> breaking <head> in HTML output by using set:html and a self-closing tag
  • Loading branch information
jakemulley authored Jan 23, 2024
2 parents e6ae592 + bb4b9bf commit 0238f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const url = Astro.url.pathname;

{
url === "/" ? (
<title>{site["site-title"]}</title>
<title set:html={site["site-title"]} />
) : (
<title>{[title, site["site-title"]].join(" | ")}</title>
<title set:html={[title, site["site-title"]].join(" | ")} />
)
}

Expand Down

0 comments on commit 0238f15

Please sign in to comment.