update:metadata stuff

This commit is contained in:
kokopi
2026-03-08 04:12:09 +09:00
parent 3dfa4f4f60
commit 51ddf60aa5
14 changed files with 272 additions and 16 deletions

35
components/heads.templ Normal file
View File

@@ -0,0 +1,35 @@
package components
templ LayoutHeadMetadata() {
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="A software engineer's life."/>
<meta name="author" content="Derrick Gee"/>
<link rel="canonical" href="https://derrickgee.dev"/>
<link rel="manifest" href="/static/assets/favicon/manifest.webmanifest">
<link rel="apple-touch-icon" href="/static/assets/favicon/apple-touch-icon.png">
<link rel="icon" href="/static/assets/favicon/icon.svg" type="image/svg+xml">
<link rel="icon" href="/static/assets/favicon/favicon.ico" sizes="32x32">
// opengraph
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://derrickgee.dev"/>
<meta property="og:title" content="Derrick Gee — Software Engineer"/>
<meta property="og:description" content="A software engineer's life."/>
<meta property="og:image" content="https://derrickgee.dev/static/assets/og-card.webp"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:image:alt" content="Derrick Gee — Software Engineer"/>
<meta property="og:site_name" content="derrickgee.dev"/>
<meta property="og:locale" content="en_US"/>
// twitter
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:url" content="https://derrickgee.dev"/>
<meta name="twitter:title" content="Derrick Gee — Software Engineer"/>
<meta name="twitter:description" content="A software engineer's life."/>
<meta name="twitter:image" content="https://derrickgee.dev/static/assets/og-card.webp"/>
<meta name="robots" content="index, follow">
}

View File

@@ -21,7 +21,7 @@ templ navbar(params *constants.LayoutParams) {
class="text-xs text-fg-300 hover:text-fg-100 transition-colors duration-150"
>projects</a>
<a
href="https://github.com"
href="https://git.kokopi.dev/kokopi/personal-site"
class="text-xs text-fg-300 hover:text-fg-100 transition-colors duration-150 flex items-center gap-1.5"
>
<svg width="12" height="12" viewBox="0 0 32 32" fill="currentColor">
@@ -32,7 +32,7 @@ templ navbar(params *constants.LayoutParams) {
gitea
</a>
<a
href="https://github.com"
href="https://github.com/kokopi-dev/personal-site"
class="text-xs text-fg-300 hover:text-fg-100 transition-colors duration-150 flex items-center gap-1.5"
>
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">
@@ -47,12 +47,12 @@ templ navbar(params *constants.LayoutParams) {
</header>
}
templ MainLayout(params *constants.LayoutParams) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@LayoutHeadMetadata()
<link rel="stylesheet" href={ fmt.Sprintf("/static/css/app.css?v=%d", time.Now().Unix()) }/>
<title>{ params.Title }</title>
</head>