@becklyn/contentful-adapter
Version:
[](https://github.com/Becklyn-Studios/contentful-adapter/actions/workflows/ci.yml)
11 lines (10 loc) • 436 B
TypeScript
import { PageForCache } from "./types";
import { Entry } from "contentful";
export interface PageCache {
getSlugOfPage: (id: string) => string;
getTitleOfPage: (id: string) => string;
getTitleOfPageBySlug: (slug: string) => string | null;
getIdOfPageBySlug: (slug: string) => string | null;
isSlugExisting: (slug: string) => boolean;
}
export declare const getPageCache: (pages: Entry<PageForCache>[]) => PageCache;