+
Credits to [Alex for this fantastic meme](https://twitter.com/alexdotjs/status/1465975816370728963)
@@ -186,7 +188,7 @@ The goal here is to use the types of your `getServerSideProps` function as a sou
As happy I am to know this exists, I've already ran into some painful edges with Next's provided `InferGetServerSidePropsType`
-- It [overrides inferable types](https://t3.gg/images/next-typesafety/infer-props-fail-1.png) as `{[key: string]: any}` generic objects if you cast function as `GetServerSideProps` w/o also manually assigning a type
+- It [overrides inferable types](./images/infer-props-fail-1.png) as `{[key: string]: any}` generic objects if you cast function as `GetServerSideProps` w/o also manually assigning a type
- It infers to `props: never` if you [don't specify input types as it expects](https://github.com/vercel/next.js/issues/15913)
To use this correctly, I had to have decent familiarity with Next's internal typings and read through [this GitHub issue thoroughly](https://github.com/vercel/next.js/issues/15913). Even with that prerequisite, I found it shockingly easy to accidentally return a non-implicit `any` type, which _does not throw any errors under the provided Next.js `tsconfig`_ .
diff --git a/public/images/announcing-ping/twitter.png b/src/content/posts/active/2022/announcing-ping/images/twitter.png
similarity index 100%
rename from public/images/announcing-ping/twitter.png
rename to src/content/posts/active/2022/announcing-ping/images/twitter.png
diff --git a/src/content/posts/announcing-ping.md b/src/content/posts/active/2022/announcing-ping/index.md
similarity index 95%
rename from src/content/posts/announcing-ping.md
rename to src/content/posts/active/2022/announcing-ping/index.md
index de31986..a920be6 100644
--- a/src/content/posts/announcing-ping.md
+++ b/src/content/posts/active/2022/announcing-ping/index.md
@@ -1,8 +1,10 @@
---
title: "Why We're Building Ping"
+slug: "announcing-ping"
date: "2022-01-11"
description: "Streaming with your friends is way too difficult. We're going to fix it. What if Zoom was built for streamers? 🤔"
-imageURL: "https://t3.gg/images/announcing-ping/twitter.png"
+cover: ./images/twitter.png
+coverAlt: "Ping announcement graphic"
readMore: true
---
@@ -18,7 +20,7 @@ After collective decades of dealing with these problems, we’re building soluti
Introducing our first creator-focused tool, [Ping](https://ping.t3.gg).
-[
](https://ping.t3.gg)
+[](https://ping.t3.gg)
Have you ever tried streaming with your friends before? If you have, then you know it’s one of the most painful processes in content creation. Interaction is the life blood of live content, and the tools to interact with your friends live are rough.
diff --git a/public/images/ping-1.0.png b/src/content/posts/active/2022/dream-job-revisited/images/ping-1.0.png
similarity index 100%
rename from public/images/ping-1.0.png
rename to src/content/posts/active/2022/dream-job-revisited/images/ping-1.0.png
diff --git a/src/content/posts/dream-job-revisited.md b/src/content/posts/active/2022/dream-job-revisited/index.md
similarity index 96%
rename from src/content/posts/dream-job-revisited.md
rename to src/content/posts/active/2022/dream-job-revisited/index.md
index 19f6518..0dae64d 100644
--- a/src/content/posts/dream-job-revisited.md
+++ b/src/content/posts/active/2022/dream-job-revisited/index.md
@@ -1,8 +1,10 @@
---
title: "I'm So Happy I Quit My Dream Job"
+slug: "dream-job-revisited"
date: "2022-06-30"
description: "It's been a wild 9 months."
-imageURL: "https://t3.gg/images/ping-1.0.png"
+cover: ./images/ping-1.0.png
+coverAlt: "Ping 1.0 branding"
readMore: true
---
@@ -73,7 +75,7 @@ We can.
## Ping.gg 1.0 Launches Today, Starting at $16
-
+[](https://ping.gg)
We’re so hyped to announce that Ping has **OFFICIALLY LAUNCHED** as of today.
diff --git a/public/images/ssr-expensive.jpg b/src/content/posts/active/2024/ssr-is-not-expensive/images/ssr-expensive.jpg
similarity index 100%
rename from public/images/ssr-expensive.jpg
rename to src/content/posts/active/2024/ssr-is-not-expensive/images/ssr-expensive.jpg
diff --git a/src/content/posts/ssr-is-not-expensive.md b/src/content/posts/active/2024/ssr-is-not-expensive/index.md
similarity index 97%
rename from src/content/posts/ssr-is-not-expensive.md
rename to src/content/posts/active/2024/ssr-is-not-expensive/index.md
index 5fd71f4..093ad05 100644
--- a/src/content/posts/ssr-is-not-expensive.md
+++ b/src/content/posts/active/2024/ssr-is-not-expensive/index.md
@@ -1,8 +1,10 @@
---
title: "Debunking the Myth: SSR Isn't Expensive"
+slug: "ssr-is-not-expensive"
date: "2024-12-10"
description: "SSR is not expensive. It's actually a great way to save money and improve the user experience."
-imageURL: "https://t3.gg/images/ssr-expensive.jpg"
+cover: ./images/ssr-expensive.jpg
+coverAlt: "SSR is not expensive cover image"
readMore: true
---
diff --git a/public/images/vite-vercel/twitter.png b/src/content/posts/archive/2021/vite-vercel/images/twitter.png
similarity index 100%
rename from public/images/vite-vercel/twitter.png
rename to src/content/posts/archive/2021/vite-vercel/images/twitter.png
diff --git a/public/images/vite-vercel/vercel-config.png b/src/content/posts/archive/2021/vite-vercel/images/vercel-config.png
similarity index 100%
rename from public/images/vite-vercel/vercel-config.png
rename to src/content/posts/archive/2021/vite-vercel/images/vercel-config.png
diff --git a/public/images/vite-vercel/vercel-dev-config.png b/src/content/posts/archive/2021/vite-vercel/images/vercel-dev-config.png
similarity index 100%
rename from public/images/vite-vercel/vercel-dev-config.png
rename to src/content/posts/archive/2021/vite-vercel/images/vercel-dev-config.png
diff --git a/src/content/posts/vite-vercel.md b/src/content/posts/archive/2021/vite-vercel/index.md
similarity index 95%
rename from src/content/posts/vite-vercel.md
rename to src/content/posts/archive/2021/vite-vercel/index.md
index 9578bf0..973296f 100644
--- a/src/content/posts/vite-vercel.md
+++ b/src/content/posts/archive/2021/vite-vercel/index.md
@@ -1,12 +1,15 @@
---
title: "Using Vite On Vercel (Semi-Outdated)"
+slug: "vite-vercel"
date: "2021-06-14"
description: "Vite and Vercel are fun new technologies that sadly don't play nice. This is a guide on how to work around that"
-imageURL: "https://t3.gg/images/vite-vercel/twitter.png"
+cover: ./images/twitter.png
+coverAlt: "Vite and Vercel graphic"
readMore: true
+archived: true
---
-
+
### UPDATE (4/17/22)
@@ -63,7 +66,7 @@ By default, Vercel tries to resolve all requests to a file at the path. Works gr
Once this is added, you can go to [Vercel.com](https://vercel.com) and create a new project. For framework, select "other". For "Output directory", override the default with `dist`
-
+
Click "deploy" and you should be live in no time!
@@ -83,7 +86,7 @@ First, we have to modify our Vercel project settings once more to point it at a
Toggle "override" for "DEVELOPMENT COMMAND" and set it to `npm run {vercel-special-command-name}`.
-
+
The following is weird enough that I [stubbed out a commit with all the related changes to make it easier to apply to your project](https://github.com/TheoBr/vercel-vite-demo/commit/8fa15f3b4bfed02019a80fc68845a1e68ef5e196)
diff --git a/src/content/posts/2023-infra.md b/src/content/posts/archive/2023/2023-infra/index.md
similarity index 98%
rename from src/content/posts/2023-infra.md
rename to src/content/posts/archive/2023/2023-infra/index.md
index 56ec38c..3488dc3 100644
--- a/src/content/posts/2023-infra.md
+++ b/src/content/posts/archive/2023/2023-infra/index.md
@@ -1,9 +1,11 @@
---
title: "Infra I'm Building On In 2023"
+slug: "2023-infra"
date: "2023-03-06"
description: "You can never be better than your infrastructure"
imageURL: "https://img.youtube.com/vi/G3rJC799L2Q/maxresdefault.jpg"
readMore: true
+archived: true
---
The products you build can never be better than the infrastructure you build them on. I have tried a LOT of different infra, and I'm really happy with what I've landed on.
diff --git a/src/content/posts/2023-tech.md b/src/content/posts/archive/2023/2023-tech/index.md
similarity index 99%
rename from src/content/posts/2023-tech.md
rename to src/content/posts/archive/2023/2023-tech/index.md
index 3e442f1..3aff227 100644
--- a/src/content/posts/2023-tech.md
+++ b/src/content/posts/archive/2023/2023-tech/index.md
@@ -1,9 +1,11 @@
---
title: "Tech I'm Shipping In 2023"
+slug: "2023-tech"
date: "2023-03-02"
description: "Picking the best tools for the job"
imageURL: "https://img.youtube.com/vi/ODJkKJUnKtM/maxresdefault.jpg"
readMore: true
+archived: true
---
The quality of the tools you work with is important. I spend...too much time thinking about this.
diff --git a/src/content/posts/2023-tools.md b/src/content/posts/archive/2023/2023-tools/index.md
similarity index 96%
rename from src/content/posts/2023-tools.md
rename to src/content/posts/archive/2023/2023-tools/index.md
index cd23cc2..ae19c98 100644
--- a/src/content/posts/2023-tools.md
+++ b/src/content/posts/archive/2023/2023-tools/index.md
@@ -1,9 +1,11 @@
---
title: "Software I Rely On In 2023"
+slug: "2023-tools"
date: "2023-03-03"
description: "The software you use is important!"
imageURL: "https://img.youtube.com/vi/uaCypXEJjes/maxresdefault.jpg"
readMore: true
+archived: true
---
diff --git a/public/images/equinusocio-danger.jpg b/src/content/posts/archive/2025/equinusocio/images/equinusocio-danger.jpg
similarity index 100%
rename from public/images/equinusocio-danger.jpg
rename to src/content/posts/archive/2025/equinusocio/images/equinusocio-danger.jpg
diff --git a/src/content/posts/equinusocio.md b/src/content/posts/archive/2025/equinusocio/index.md
similarity index 96%
rename from src/content/posts/equinusocio.md
rename to src/content/posts/archive/2025/equinusocio/index.md
index 37604b9..5b2cb87 100644
--- a/src/content/posts/equinusocio.md
+++ b/src/content/posts/archive/2025/equinusocio/index.md
@@ -1,9 +1,12 @@
---
title: "Mattia Astorino (equinusocio) Is Dangerous"
+slug: "equinusocio"
date: "2025-02-26"
description: "Mattia is the creator of Material Theme for VS Code. He is also insane."
-imageURL: "https://t3.gg/images/equinusocio-danger.jpg"
+cover: ./images/equinusocio-danger.jpg
+coverAlt: "Material Theme warning graphic"
readMore: true
+archived: true
---
Remember the Material Theme for VS Code? It is being managed so poorly that the result is indistinguishable from malware, and Mattia Astorino (aka equinusocio) is to blame.
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index ef576a5..a68529d 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -3,6 +3,8 @@ import { cn } from "../utils/cn";
import "../style/global.css";
import { ClientRouter } from "astro:transitions";
import LeftArrow from "../assets/icons/left-arrow.svg.astro";
+import { getImage } from "astro:assets";
+import type { ImageMetadata } from "astro";
const socialLinks = [
{ href: "https://github.com/t3dotgg", label: "gh" },
@@ -14,6 +16,12 @@ const socialLinks = [
interface Props {
title: string;
description: string;
+ canonicalUrl?: string;
+ ogImage?: ImageMetadata | string;
+ ogImageAlt?: string;
+ ogType?: "website" | "article";
+ publishedTime?: Date;
+ updatedTime?: Date;
classNames?: {
html?: string;
body?: string;
@@ -36,10 +44,40 @@ const defaultBackToLink: Props["backToLink"] = {
const {
title,
description,
+ canonicalUrl,
+ ogImage,
+ ogImageAlt,
+ ogType = "website",
+ publishedTime,
+ updatedTime,
classNames,
backToLink = defaultBackToLink,
} = Astro.props;
const isHomepage = Astro.url.pathname === "/";
+
+const siteUrl = Astro.site ?? Astro.url;
+const canonicalHref =
+ canonicalUrl ?? new URL(Astro.url.pathname, siteUrl).toString();
+
+const defaultOgImagePath = "/images/twitter.png";
+let resolvedOgImageAlt = ogImageAlt ?? title;
+let resolvedOgImageHref = new URL(defaultOgImagePath, siteUrl).toString();
+
+if (ogImage) {
+ if (typeof ogImage === "string") {
+ resolvedOgImageHref = ogImage.startsWith("http")
+ ? ogImage
+ : new URL(ogImage, siteUrl).toString();
+ } else {
+ const generatedOgImage = await getImage({
+ src: ogImage,
+ width: 1200,
+ height: 630,
+ format: "png",
+ });
+ resolvedOgImageHref = new URL(generatedOgImage.src, siteUrl).toString();
+ }
+}
---
+ these posts keep their URLs but no longer show up in the main feed. +
+no archived posts yet.
+ ) : ( +thoughts on tech and content. usually goes to twitter, sometimes here.
+ + rss + + + archive ++ Redirecting to the canonical URL.{" "} + Continue +
+ +