mirror of
https://github.com/khairul169/code-share.git
synced 2025-06-17 17:19:34 +07:00
12 lines
366 B
TypeScript
12 lines
366 B
TypeScript
|
import type { PageContext } from "vike/types";
|
||
|
|
||
|
export function getPageMetadata(pageContext: PageContext) {
|
||
|
let title = pageContext.data?.title || pageContext.config.title;
|
||
|
title = title ? `${title} - Vike` : "Welcome to Vike";
|
||
|
|
||
|
const description =
|
||
|
pageContext.data?.description || pageContext.config.description || "";
|
||
|
|
||
|
return { title, description };
|
||
|
}
|