aboutsummaryrefslogtreecommitdiff
path: root/src/pages/404.astro
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-04-22 19:11:58 +0300
committerValentin Popov <valentin@popov.link>2026-04-22 19:11:58 +0300
commit5e818d804d5d38beff0f3754a006333752fd5082 (patch)
tree7f2d1097390bbdb3c5fa1593f6d15d6dfb3b0dd8 /src/pages/404.astro
parent41bb3099660b6210a419c4190a1bc08d7ba58c00 (diff)
downloadpopov.link-5e818d804d5d38beff0f3754a006333752fd5082.tar.xz
popov.link-5e818d804d5d38beff0f3754a006333752fd5082.zip
refactor: update schema handling and improve SEO metadata
- Changed schema type from WithContext<Thing> to Thing[] in Head, BaseLayout, and JsonLd components for better flexibility. - Added optional robots meta tag to Head component. - Updated JSON-LD generation in JsonLd component to include a structured payload. - Enhanced page and blog schemas to support breadcrumb and person schemas for improved SEO. - Introduced new utility schemas for website and person to streamline schema generation. - Refactored existing schemas to align with the new structure and ensure consistency across components.
Diffstat (limited to 'src/pages/404.astro')
-rw-r--r--src/pages/404.astro20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/pages/404.astro b/src/pages/404.astro
index 3ec9feb..e76215e 100644
--- a/src/pages/404.astro
+++ b/src/pages/404.astro
@@ -8,16 +8,20 @@ const description = "The page you're looking for doesn't exist!";
const preview = config.og.defaultPreview;
const lang = "en";
-const schema = pageSchema({
- siteUrl: new URL("/", Astro.site).toString(),
- page: "/404",
- title,
- description,
- lang,
-});
+const siteUrl = new URL("/", Astro.site).toString();
+
+const schema = [
+ pageSchema({
+ siteUrl,
+ page: "/404",
+ title,
+ description,
+ lang,
+ }),
+];
---
-<Layout title={title} description={description} preview={preview} lang={lang} schema={schema}>
+<Layout title={title} description={description} preview={preview} lang={lang} robots="noindex, follow" schema={schema}>
<div style={{ "text-align": "center" }}>
<h1>404</h1>
<p><strong>Page not found</strong></p>