Skip to content

Commit f4e7afa

Browse files
committed
refactor: update SEO component to use logo URL from baseUrl and replace favicon references
- Updated the SEO component to generate organization and article schema using a logo URL derived from baseUrl. - Replaced favicon references in the schema with the new logo URL. - Updated favicon.svg to a new design. - Modified several static assets including apple-touch-icon, favicon images, and web app manifest images.
1 parent b2a9801 commit f4e7afa

9 files changed

Lines changed: 20 additions & 12 deletions

File tree

src/lib/components/Nav.svelte

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,21 @@
4444
$effect(() => {
4545
syncThemeState();
4646
});
47-
48-
const logo = `M119.261 35C128.462 35.0001 137.256 38.8378 143.569 45.6083L160.108 63.3453C166.421 70.1159 175.215 73.9536 184.416 73.9536H298.583C317.039 73.9536 332 89.0902 332 107.762V270.191C332 288.863 317.039 304 298.583 304H41.417C22.9613 304 8 288.863 8 270.191V68.8087C8.0001 50.1368 22.9614 35 41.417 35H119.261ZM169.23 219.37V259.415H291.318V219.37H169.23ZM50.7361 111.182L110.398 171.838L51.027 226.311L79.9846 258.994L169.77 173.606L82.022 81.2961L50.7361 111.182Z`;
4947
const iconButtonClass =
5048
"size-8 rounded-full border border-(--b1) bg-(--bg2)/90 text-(--t2) shadow-none hover:border-(--t4) hover:bg-(--bg3) hover:text-(--t1)";
5149
const ghostIconButtonClass =
5250
"size-8 rounded-full border border-transparent bg-transparent text-(--t2) shadow-none hover:bg-(--bg3) hover:text-(--t1)";
5351
</script>
5452

5553
{#snippet logoIcon(size: number)}
56-
<svg width={size} height={size} viewBox="0 0 339 339" fill="none" xmlns="http://www.w3.org/2000/svg">
57-
<path fill-rule="evenodd" clip-rule="evenodd" d={logo} fill="currentColor" />
58-
</svg>
54+
<img
55+
src="/logo.svg"
56+
alt="filepath logo"
57+
width={size}
58+
height={size}
59+
class="shrink-0"
60+
loading="lazy"
61+
/>
5962
{/snippet}
6063

6164
{#snippet menuButton()}

src/lib/components/SEO.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,16 @@
125125
}
126126
127127
function generateOrganizationSchema(): OrganizationSchema {
128+
const logoUrl = `${baseUrl}/logo.svg`;
129+
128130
return {
129131
"@context": "https://schema.org",
130132
"@type": "Organization",
131133
name: PLATFORM_NAME,
132134
url: baseUrl,
133135
logo: {
134136
"@type": "ImageObject",
135-
url: `${baseUrl}/favicon.svg`,
137+
url: logoUrl,
136138
},
137139
sameAs,
138140
};
@@ -141,6 +143,8 @@
141143
function generateArticleSchema(): ArticleSchema | null {
142144
if (type !== "article") return null;
143145
146+
const logoUrl = `${baseUrl}/logo.svg`;
147+
144148
return {
145149
"@context": "https://schema.org",
146150
"@type": "Article",
@@ -157,7 +161,7 @@
157161
name: PLATFORM_NAME,
158162
logo: {
159163
"@type": "ImageObject",
160-
url: `${baseUrl}/favicon.svg`,
164+
url: logoUrl,
161165
},
162166
},
163167
datePublished: publishedTime,

static/apple-touch-icon.png

-301 Bytes
Loading

static/favicon-96x96.png

-365 Bytes
Loading

static/favicon.ico

0 Bytes
Binary file not shown.

static/favicon.svg

Lines changed: 1 addition & 5 deletions
Loading

static/logo.svg

Lines changed: 5 additions & 0 deletions
Loading
-498 Bytes
Loading
-2.42 KB
Loading

0 commit comments

Comments
 (0)