UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

59 lines 1.36 kB
import { ViewName } from '../type'; /** * Taxonomy entity holds taxonomy configuration */ export declare class Taxonomy { private taxonomies; private views; private viewsByTreeKey; constructor(taxonomies: Record<string, string>); /** * Get taxonomy views */ getViews(): ViewName[]; /** * Get taxonomies configuration */ getTaxonomies(): Record<string, string>; /** * Get view by tree key */ getViewByTreeKey(treeKey: string): ViewName | undefined; /** * Check if taxonomy exists */ hasTaxonomy(singular: string): boolean; /** * Get plural form of taxonomy */ getPluralForm(singular: string): string | undefined; /** * Get singular form from plural */ getSingularForm(plural: string): string | undefined; /** * Get all singular forms */ getSingularForms(): string[]; /** * Get all plural forms */ getPluralForms(): string[]; /** * Setup taxonomy views */ private setupViews; /** * Get view count */ getViewCount(): number; /** * Check if taxonomies are empty */ isEmpty(): boolean; } /** * Create a new Taxonomy instance from provider data */ export declare function newTaxonomy(data: any): Taxonomy; //# sourceMappingURL=taxonomy.d.ts.map