feat: switch OG images to vercel edge runtime + Satori

This commit is contained in:
Travis Fischer
2022-10-14 17:32:42 -04:00
parent 07d84bd5ea
commit 04b9c581a3
9 changed files with 383 additions and 416 deletions

View File

@@ -6,7 +6,7 @@
*/
import { parsePageId } from 'notion-utils'
import posthog from 'posthog-js'
import type posthog from 'posthog-js'
import { getEnv, getSiteConfig } from './get-config-value'
import { NavigationLink } from './site-config'
import {
@@ -131,6 +131,7 @@ export const apiBaseUrl = `/api`
export const api = {
searchNotion: `${apiBaseUrl}/search-notion`,
getNotionPageInfo: `${apiBaseUrl}/notion-page-info`,
getSocialImage: `${apiBaseUrl}/social-image`
}

File diff suppressed because one or more lines are too long

View File

@@ -60,3 +60,13 @@ export interface PageUrlOverridesInverseMap {
// (this overrides the built-in URL path generation for these pages)
[pageId: string]: string
}
export interface NotionPageInfo {
pageId: string
title: string
image: string
imageObjectPosition: string
author: string
authorImage: string
detail: string
}