Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement word open-graph image #46

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: vercel error try 2
babblebey committed Apr 19, 2024
commit 720e06f427e2954d9422b21caaacd5ab79ad3652
5 changes: 4 additions & 1 deletion src/pages/api/open-graph/[id].png.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,10 @@ const dictionary = import.meta.glob("../../browse/*.mdx", { eager: true });
*/
export async function GET({ params }) {
// const InterBuffer = readFileSync(process.cwd() + Inter);
const IBMPlexMonoBuffer = readFileSync(process.cwd() + "font/IBMPlexMono-SemiBold.ttf");
const IBMPlexMonoBuffer = readFileSync(process.cwd() + "/public/font/IBMPlexMono-SemiBold.ttf");

// const font = await fetch(new URL("../../../../public/font/IBMPlexMono-SemiBold.ttf", import.meta.url));
// const fontBuffer = await font.arrayBuffer();

const word = dictionary[`../../browse/${params.id}.mdx`];