@@ -9,12 +9,15 @@ export const RouterHead = component$(() => {
9
9
const loc = useLocation ( ) ;
10
10
11
11
const imageSrc = "https://partytown.qwik.dev/partytown-media.png" ;
12
+ const description =
13
+ head . meta . find ( ( m ) => m . name === "description" ) ?. content ||
14
+ `Partytown is a lazy-loaded library to help relocate resource intensive scripts into a web worker` ;
12
15
13
16
return (
14
17
< >
15
18
< title > { head . title } </ title >
16
- < meta name = "description" content = "Partytown is a lazy-loaded library to help relocate resource intensive scripts into a web worker" />
17
-
19
+ < meta name = "description" content = { description } />
20
+
18
21
< link rel = "canonical" href = { loc . url . href } />
19
22
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
20
23
< link rel = "icon" type = "image/svg+xml" href = "/favicon.svg" />
@@ -29,7 +32,7 @@ export const RouterHead = component$(() => {
29
32
< meta
30
33
name = "description"
31
34
property = "og:description"
32
- content = { head . frontmatter . description || head . frontmatter . title }
35
+ content = { description || head . frontmatter . title }
33
36
/>
34
37
< meta property = "og:site_name" content = { head . frontmatter . title } />
35
38
@@ -38,7 +41,7 @@ export const RouterHead = component$(() => {
38
41
< meta name = "twitter:title" content = { head . frontmatter . title } />
39
42
< meta
40
43
name = "twitter:description"
41
- content = { head . frontmatter . description || head . frontmatter . title }
44
+ content = { description || head . frontmatter . title }
42
45
/>
43
46
< meta name = "twitter:image" content = { imageSrc } />
44
47
< meta name = "twitter:image:alt" content = "Partytown Logo" />
0 commit comments