UNPKG

poststore

Version:

PostStore can be used with NEXT.JS to create markdown-based blogs.

13 lines (12 loc) 952 B
import { Path, FileNode, PageParamOption, PathList, PerPageOption } from '../typings'; export declare const convertToPath: (paramName: string) => (slug: string | string[]) => Path; export declare const getCategoriesPaths: (rootNode: FileNode, perPage?: number, parents?: string[]) => string[][]; export declare const getTagsPaths: (rootNode: FileNode, perPage?: number) => string[][]; export declare const getPagePaths: (rootNode: FileNode, perPage?: number, nodeCondition?: (node: FileNode) => boolean) => string[][]; interface getPathListProps { rootNode: FileNode; paramOption: Required<PageParamOption>; perPageOption: Required<PerPageOption>; } export declare const getPathList: ({ rootNode, paramOption: { category: categoryParam, page: pageParam, post: postParam, tag: tagParam, }, perPageOption: { page: pagesPerMain, category: pagesPerCategoryPage, tag: pagesPerTagPage, }, }: getPathListProps) => PathList; export {};