mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 00:59:37 +07:00
14 lines
424 B
TypeScript
14 lines
424 B
TypeScript
import type { PageContext } from "vike/types";
|
|
|
|
export function getPageMetadata(pageContext: PageContext) {
|
|
let title = pageContext.data?.title || pageContext.config.title;
|
|
title = title ? `${title} - CodeShare` : "Welcome to CodeShare";
|
|
|
|
const description =
|
|
pageContext.data?.description ||
|
|
pageContext.config.description ||
|
|
"Share your frontend result with everyone";
|
|
|
|
return { title, description };
|
|
}
|