@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
97 lines (96 loc) • 3.59 kB
TypeScript
import { File as FileInfo, Page, PageGroups, PageIdentity, PageMap, PageOutput, Pager, PagerManager, Pages, Position, Organization, Author, Menu } from "@internal/domain/content";
import { Source } from "@internal/domain/content/entity/pagesource";
import { Content } from "@internal/domain/content/entity/pagecontent";
import { Layout } from "@internal/domain/content/entity/pagelayout";
import { Meta } from "@internal/domain/content/entity/pagemeta";
import { Output } from "@internal/domain/content/entity/pageoutput";
import { Scratch } from '@pkg/maps/scratch';
import { Path } from "@internal/domain/paths";
export declare class PageImpl implements Page {
source: Source;
content: Content;
meta: Meta;
layout: Layout;
pagerManager: PagerManager;
title_: string;
description_: string;
kind_: string;
pageMap: PageMap | null;
output_: Output | null;
private store_;
constructor(source: Source, content: Content, meta: Meta, layout: Layout, title?: string, kind?: string, pageMap?: PageMap | null);
rawContent(): string;
pageIdentity(): PageIdentity;
pageFile(): FileInfo;
staleVersions(): number[];
section(): string;
paths(): Path;
path(): string;
slug(): string;
private pathToSlug;
posOffset(offset: number): Promise<Position>;
description(): string;
get Description(): string;
StaticURL(src: string): string;
params(): Record<string, any>;
get Params(): Record<string, any>;
store(): Scratch;
get Store(): Scratch;
scratch(): Scratch;
get Scratch(): Scratch;
pageBaseUrl(): string;
pageWeight(): number;
pageDate(): Date;
publishDate(): Date;
relatedKeywords(cfg: any): Promise<any[]>;
shouldList(global: boolean): boolean;
shouldListAny(): boolean;
noLink(): boolean;
organization(): Organization | undefined;
author(): Author | undefined;
menu(): Menu | undefined;
current(): Promise<Pager>;
setCurrent(current: Pager): void;
paginator(): Promise<Pager>;
paginate(groups: PageGroups): Promise<Pager>;
paginate(pages: Pages): Promise<Pager>;
file(): FileInfo;
get Type(): string;
name(): string;
title(): string;
get Title(): string;
kind(): string;
isHome(): boolean;
isPage(): boolean;
isSection(): boolean;
isAncestor(other: Page): boolean;
eq(other: Page): boolean;
layouts(): string[];
output(): PageOutput;
get TargetPath(): string;
get Summary(): Promise<string>;
truncated(): boolean;
parent(): Page | null;
Pages(): Promise<Pages>;
pages(): Promise<Pages>;
prevInSection(): Page | null;
nextInSection(): Page | null;
sections(langIndex: number): Pages;
regularPages(): Promise<Pages>;
regularPagesRecursive(): Pages;
terms(langIndex: number, taxonomy: string): Promise<Pages | null>;
isTranslated(): Promise<boolean>;
translations(): Promise<Pages>;
allTranslations(): Promise<Pages>;
isBundled(): boolean;
}
export declare class TaxonomyPageImpl extends PageImpl {
singular: string;
constructor(source: Source, content: Content, meta: Meta, layout: Layout, singular: string, title?: string, kind?: string, pageMap?: PageMap | null);
params(): Record<string, any>;
}
export declare class TermPageImpl extends TaxonomyPageImpl {
term: string;
constructor(source: Source, content: Content, meta: Meta, layout: Layout, singular: string, term: string, title?: string, kind?: string, pageMap?: PageMap | null);
params(): Record<string, any>;
}