From a31e367ef5f7bec876d78b26aa6f4d6bee8ac5db Mon Sep 17 00:00:00 2001 From: Alexander Daichendt Date: Thu, 2 Jan 2025 00:08:25 +0100 Subject: [PATCH] fix: lighthouse issues --- public/robots.txt | 38 +++++++++ src/content/blog/cv-verification.mdx | 2 +- src/layouts/BlogPost.astro | 121 +++++++++++++-------------- 3 files changed, 97 insertions(+), 64 deletions(-) create mode 100644 public/robots.txt diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..f4a3e44 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,38 @@ +User-agent: GPTBot +Disallow: / + +User-agent: ChatGPT-User +Disallow: / + +User-agent: Google-Extended +Disallow: / + +User-agent: CCBot +Disallow: / + +User-agent: anthropic-ai +Disallow: / + +User-agent: Claude-Web +Disallow: / + +User-agent: cohere-ai +Disallow: / + +User-agent: Omgilibot +Disallow: / + +User-agent: Omgili +Disallow: / + +User-agent: FacebookBot +Disallow: / + +User-agent: Amazonbot +Disallow: / + +# Common AI scraper endpoints +Disallow: /*?*source= +Disallow: /*?*ref= +Disallow: /*?*ai= +Disallow: /*&*ai= diff --git a/src/content/blog/cv-verification.mdx b/src/content/blog/cv-verification.mdx index b0e20dc..af71c7b 100644 --- a/src/content/blog/cv-verification.mdx +++ b/src/content/blog/cv-verification.mdx @@ -1,7 +1,7 @@ --- pubDate: '2025-01-02' title: 'Building a CV verification tool in Typst, Astro and Cloudflare D1' -description: "" +description: "Technical details on how I built a CV verification tool in Typst, Astro and Cloudflare D1." keywords: - CV - verification diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index a14b3c8..5e14597 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -5,77 +5,72 @@ import BaseLayout from "./BaseLayout.astro"; import { Picture } from "astro:assets"; type Props = CollectionEntry<"blog">["data"] & { - readingTime: number; + readingTime: number; }; const { title, description, pubDate, updatedDate, heroImage, readingTime } = - Astro.props; + Astro.props; --- -
-
- { - heroImage && ( - - ) - } +
+
+ {heroImage && } +
+
+
+
+ + { + updatedDate && ( +
+ Last updated on +
+ ) + }
-
-
-
- - { - updatedDate && ( -
- Last updated on{" "} - -
- ) - } -
-

{title}

-

{readingTime}

-
-
- -
-
+

{title}

+

{readingTime}

+
+
+ + +