Files
spsays-training/lib/bk.ts
T
2026-05-10 00:35:14 +05:30

30 lines
673 B
TypeScript

import {
getBookMeta,
getChapter,
getContent,
getSidebarItems,
type BookMeta,
type Chapter,
type SidebarItem,
} from "@/lib/books";
const CODE = "bk";
export type BkMeta = BookMeta;
export type BkChapterEntry = { number: number; title: string };
export type BkChapter = Chapter;
export type BkSidebarItem = SidebarItem;
export async function getBkMeta() {
return getBookMeta(CODE);
}
export async function getBkChapter(chapterNum: number) {
return getChapter(CODE, String(chapterNum));
}
export async function getBkContent(slug: string) {
return getContent(CODE, slug);
}
export async function getBkSidebarItems() {
return getSidebarItems(CODE);
}