UNPKG

@oberoncms/core

Version:

OberonCMS is a cloud deployable CMS written in typescript based on the Puck visual editor

17 lines (16 loc) 418 B
import { resolveSlug, getTitle, parseClientAction } from "./utils.js"; async function getMetaData({ getPageData }, path = [], action) { const slug = resolveSlug(path); if (action) { return { title: getTitle(parseClientAction(action), slug) }; } const data = await getPageData(slug); return { title: (data == null ? void 0 : data.root.title) || "Oberon CMS" }; } export { getMetaData };