feat(index): remove twitter images

This commit is contained in:
z0x 2025-02-06 21:11:04 -05:00
parent 074cfc0498
commit 08b23e19f5
7 changed files with 11 additions and 39 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,16 +0,0 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_271_118)">
<rect width="512" height="74" fill="#CCCCCC"/>
<rect y="146" width="512" height="74" fill="#CCCCCC"/>
<rect y="292" width="512" height="74" fill="#CCCCCC"/>
<rect y="438" width="512" height="74" fill="#CCCCCC"/>
<rect y="74" width="72" height="72" fill="#CCCCCC"/>
<rect y="366" width="72" height="72" fill="#CCCCCC"/>
<rect x="440" y="220" width="72" height="72" fill="#CCCCCC"/>
</g>
<defs>
<clipPath id="clip0_271_118">
<rect width="512" height="512" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

View file

@ -8,12 +8,11 @@ import { ClientRouter } from "astro:transitions";
interface Props { interface Props {
title: string; title: string;
description: string; description: string;
image?: string;
} }
const canonicalURL = new URL(Astro.url.pathname, Astro.site); const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = "/static/twitter-card.png" } = Astro.props; const { title, description } = Astro.props;
--- ---
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -36,13 +35,11 @@ const { title, description, image = "/static/twitter-card.png" } = Astro.props;
<meta property="og:site_name" content={SITE.TITLE} /> <meta property="og:site_name" content={SITE.TITLE} />
<meta property="og:title" content={title} /> <meta property="og:title" content={title} />
<meta property="og:description" content={description} /> <meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image, Astro.url)} />
<meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={Astro.url} /> <meta property="twitter:url" content={Astro.url} />
<meta property="twitter:title" content={title} /> <meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} /> <meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
<ClientRouter /> <ClientRouter />

View file

@ -1,26 +1,21 @@
--- ---
import Footer from '@/components/Footer.astro' import Footer from "@/components/Footer.astro";
import Head from '@/components/Head.astro' import Head from "@/components/Head.astro";
import Header from '@/components/Header.astro' import Header from "@/components/Header.astro";
import { SITE } from '@/consts' import { SITE } from "@/consts";
type Props = { type Props = {
title: string title: string;
description: string description: string;
image?: string };
}
const { title, description, image } = Astro.props const { title, description } = Astro.props;
--- ---
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<Head <Head title={`${title} | ${SITE.TITLE}`} description={description} />
title={`${title} | ${SITE.TITLE}`}
description={description}
image={image}
/>
</head> </head>
<body> <body>
<div <div

View file

@ -49,11 +49,7 @@ const post = Astro.props;
const { Content, headings } = await render(post); const { Content, headings } = await render(post);
--- ---
<Layout <Layout title={post.data.title} description={post.data.description}>
title={post.data.title}
description={post.data.description}
image={post.data.image?.src ?? "/static/1200x630.png"}
>
<section <section
class="grid grid-cols-[minmax(0px,1fr)_min(768px,100%)_minmax(0px,1fr)] gap-y-6 *:px-4" class="grid grid-cols-[minmax(0px,1fr)_min(768px,100%)_minmax(0px,1fr)] gap-y-6 *:px-4"
> >