+ {/* Content area: logo + title, optically centred above colour bars */}
+
+
+ {displayTitle && (
+
+ {displayTitle}
+
+ )}
+
+
+
,
+ {
+ width,
+ height,
+ fonts: [
+ {
+ name: FONT_FAMILY,
+ data: fontData,
+ weight: 700,
+ style: 'normal' as const,
+ },
+ ],
+ }
+ );
+
+ const resvg = new Resvg(svg, {
+ fitTo: { mode: 'width', value: width },
+ });
+ const pngData = resvg.render();
+ return Buffer.from(pngData.asPng());
+}
diff --git a/site/src/utils/og/resolve-og-request.ts b/site/src/utils/og/resolve-og-request.ts
new file mode 100644
index 00000000..23a108de
--- /dev/null
+++ b/site/src/utils/og/resolve-og-request.ts
@@ -0,0 +1,95 @@
+import { normalizeSitePath } from '@/utils/og/normalize-site-path';
+import type { OgSize } from '@/utils/og/render-og-image';
+import { buildOgTitleMap } from '@/utils/og/title-entries';
+
+const ONE_YEAR_IN_SECONDS = 60 * 60 * 24 * 365;
+
+type OgTitleMap = Map