@nekm/svelte-core 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/seo.svelte +20 -1
- package/dist/seo.svelte.d.ts +1 -0
- package/package.json +1 -1
package/dist/seo.svelte
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
readonly description: string;
|
|
31
31
|
readonly origin?: string;
|
|
32
32
|
readonly icon: SeoIcon;
|
|
33
|
+
readonly additionalIcons?: ReadonlyArray<SeoIcon>;
|
|
33
34
|
readonly canonical?: SeoCanonical;
|
|
34
35
|
readonly next?: SeoCanonical;
|
|
35
36
|
readonly twitter?: SeoTwitter;
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
pageTitle,
|
|
41
42
|
description,
|
|
42
43
|
icon,
|
|
44
|
+
additionalIcons = [],
|
|
43
45
|
canonical,
|
|
44
46
|
next,
|
|
45
47
|
origin: propsOrigin,
|
|
@@ -59,7 +61,9 @@
|
|
|
59
61
|
|
|
60
62
|
const origin = $derived(propsOrigin ?? page.url.origin);
|
|
61
63
|
const iconHref = $derived(urlSetOrigin(origin, icon.href));
|
|
62
|
-
const canonicalUrl = $derived(
|
|
64
|
+
const canonicalUrl = $derived(
|
|
65
|
+
!canonical ? origin : createCanonical(canonical),
|
|
66
|
+
);
|
|
63
67
|
const nextUrl = $derived(!next ? undefined : createCanonical(next));
|
|
64
68
|
</script>
|
|
65
69
|
|
|
@@ -67,6 +71,21 @@
|
|
|
67
71
|
<title>{pageTitle} | {siteTitle}</title>
|
|
68
72
|
<meta name="description" content={description} />
|
|
69
73
|
<link rel="canonical" href={canonicalUrl} />
|
|
74
|
+
<link
|
|
75
|
+
rel="icon"
|
|
76
|
+
type={icon.mimeContentType}
|
|
77
|
+
sizes="{icon.width}x{icon.height}"
|
|
78
|
+
href={icon.href}
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
{#each additionalIcons as icon}
|
|
82
|
+
<link
|
|
83
|
+
rel="icon"
|
|
84
|
+
type={icon.mimeContentType}
|
|
85
|
+
sizes="{icon.width}x{icon.height}"
|
|
86
|
+
href={icon.href}
|
|
87
|
+
/>
|
|
88
|
+
{/each}
|
|
70
89
|
|
|
71
90
|
{#if nextUrl}
|
|
72
91
|
<link rel="next" href={nextUrl} />
|
package/dist/seo.svelte.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface SeoProps {
|
|
|
19
19
|
readonly description: string;
|
|
20
20
|
readonly origin?: string;
|
|
21
21
|
readonly icon: SeoIcon;
|
|
22
|
+
readonly additionalIcons?: ReadonlyArray<SeoIcon>;
|
|
22
23
|
readonly canonical?: SeoCanonical;
|
|
23
24
|
readonly next?: SeoCanonical;
|
|
24
25
|
readonly twitter?: SeoTwitter;
|
package/package.json
CHANGED