✨ Add description and keywords to meta tags
All checks were successful
Build and deploy website / build (push) Successful in 37s
All checks were successful
Build and deploy website / build (push) Successful in 37s
This commit is contained in:
parent
a2584b97a1
commit
ebb3db8645
11
TODO.md
11
TODO.md
@ -14,13 +14,13 @@
|
|||||||
## Layout
|
## Layout
|
||||||
- [ ] Dark mode toggle
|
- [ ] Dark mode toggle
|
||||||
- [ ] Navigate using pathname / breadcrumbs
|
- [ ] Navigate using pathname / breadcrumbs
|
||||||
- [ ] Better style for <code /> blocks
|
- [ ] Better style for \<code /> blocks
|
||||||
|
|
||||||
## Accessibility
|
## Accessibility
|
||||||
- [ ] All interactable elements have labels
|
- [ ] All interactable elements have labels
|
||||||
|
|
||||||
## I18N
|
## I18N
|
||||||
- [ ] Markdown for text
|
- [ ] Markdown for translations
|
||||||
|
|
||||||
## ~/
|
## ~/
|
||||||
- [ ] About me description
|
- [ ] About me description
|
||||||
@ -33,16 +33,19 @@
|
|||||||
|
|
||||||
## ~/projects
|
## ~/projects
|
||||||
- [ ] Translate projects
|
- [ ] Translate projects
|
||||||
- [ ] NixOS on desktop
|
|
||||||
- [ ] RSS Feed
|
- [ ] RSS Feed
|
||||||
|
|
||||||
## ~/projects/[project]
|
## ~/projects/[project]
|
||||||
- [ ] Only use Gitea icon for Gitea links
|
- [ ] Only use Gitea icon for Gitea links
|
||||||
- [ ] Bachelor project
|
- [ ] Bachelor project
|
||||||
- [ ] Sparebank1 ActualBudget service
|
- [x] Sparebank1 ActualBudget service
|
||||||
- [ ] More about this website
|
- [ ] More about this website
|
||||||
|
- [ ] NixOS on desktop
|
||||||
- [ ] Copy link to h tag and scroll to h tag on load
|
- [ ] Copy link to h tag and scroll to h tag on load
|
||||||
- [x] External links should open in new tab
|
- [x] External links should open in new tab
|
||||||
|
- [x] Add keywords to meta tag
|
||||||
|
- [x] Add description to meta tag
|
||||||
|
- [ ] Source on image if "borrowed" from somewhere
|
||||||
|
|
||||||
## ~/slashes
|
## ~/slashes
|
||||||
- [ ] List of all slashes
|
- [ ] List of all slashes
|
||||||
|
@ -22,6 +22,7 @@ const {
|
|||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
tags,
|
tags,
|
||||||
|
keywords,
|
||||||
heroImage,
|
heroImage,
|
||||||
heroImageAlt,
|
heroImageAlt,
|
||||||
source,
|
source,
|
||||||
@ -37,7 +38,12 @@ function localeDateString(isoString: string): string {
|
|||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={title} class="mx-auto max-w-[750px]">
|
<Layout
|
||||||
|
title={title}
|
||||||
|
class="mx-auto max-w-[750px]"
|
||||||
|
description={description}
|
||||||
|
keywords={keywords}
|
||||||
|
>
|
||||||
<div class="flex justify-between my-2">
|
<div class="flex justify-between my-2">
|
||||||
<div>
|
<div>
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
|
@ -5,7 +5,7 @@ description: "Welcome to my homepage / portfolio"
|
|||||||
heroImage: "assets/recursive-meme.png"
|
heroImage: "assets/recursive-meme.png"
|
||||||
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"
|
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"
|
||||||
tags: [Astro, Svelte, TypeScript, I18n, TailwindCSS, Docker]
|
tags: [Astro, Svelte, TypeScript, I18n, TailwindCSS, Docker]
|
||||||
keywords: []
|
keywords: [Martin Berg Alstad, portfolio, homepage, website, martials, emberal]
|
||||||
source: "https://git.martials.no/martials/martials.no"
|
source: "https://git.martials.no/martials/martials.no"
|
||||||
createdAt: "2024-09-22"
|
createdAt: "2024-09-22"
|
||||||
updatedAt: "2025-02-15"
|
updatedAt: "2025-02-15"
|
||||||
|
@ -6,9 +6,11 @@ import { resolvePathname } from "@/utils/linking"
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string
|
title: string
|
||||||
|
description?: string
|
||||||
|
keywords?: ReadonlyArray<string>
|
||||||
class?: string
|
class?: string
|
||||||
}
|
}
|
||||||
const { title, class: clazz } = Astro.props
|
const { title, description, keywords, class: clazz } = Astro.props
|
||||||
const mainClass =
|
const mainClass =
|
||||||
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
|
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
|
||||||
---
|
---
|
||||||
@ -17,13 +19,16 @@ const mainClass =
|
|||||||
<html lang={languageTag()} dir={"ltr"}>
|
<html lang={languageTag()} dir={"ltr"}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="description" content="Astro description" />
|
<meta name="author" content="Martin Berg Alstad" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<meta name="generator" content={Astro.generator} />
|
||||||
|
{description && <meta name="description" content={description} />}
|
||||||
|
{keywords && <meta name="keywords" content={keywords.join(", ")} />}
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
<link rel="icon" type="image/jpg" href="/favicon.jpg" />
|
<link rel="icon" type="image/jpg" href="/favicon.jpg" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
|
||||||
<title>{title} | Martin Berg Alstad</title>
|
<title>{title} | Martin Berg Alstad</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col min-h-screen bg-cat-base text-cat-text">
|
<body class="flex flex-col min-h-screen bg-cat-base text-cat-text">
|
||||||
<Header />
|
<Header />
|
||||||
<main class:list={[mainClass, clazz]}>
|
<main class:list={[mainClass, clazz]}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user