mirror of
https://github.com/khairul169/code-share.git
synced 2026-10-24 11:53:58 +07:00
feat: update metadata
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { PageContext } from "vike/types";
|
||||
import { render } from "vike/abort";
|
||||
import trpcServer from "~/server/api/trpc/trpc";
|
||||
import { BASE_URL } from "~/lib/consts";
|
||||
|
||||
export const data = async (ctx: PageContext) => {
|
||||
const trpc = await trpcServer(ctx);
|
||||
@@ -20,6 +21,9 @@ export const data = async (ctx: PageContext) => {
|
||||
return {
|
||||
title: project.title,
|
||||
description: `Check ${project.title} on CodeShare!`,
|
||||
ogImage: project.thumbnail
|
||||
? BASE_URL + "/api/thumbnail" + project.thumbnail
|
||||
: undefined,
|
||||
project,
|
||||
files,
|
||||
initialFiles,
|
||||
|
||||
Reference in New Issue
Block a user