@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
146 lines (145 loc) • 4.81 kB
TypeScript
import { Page as ContentPage, PageGroups, PageMeta, PageOutput, Pager, Pages, PageSource, Position } from '@internal/domain/content';
import { LanguageService, Template } from '../type';
import { Site } from './site';
import { Publisher } from './publisher';
import { SitePager } from "./pager";
import { Scratch } from "@pkg/maps/scratch";
export declare class Page implements ContentPage, PageMeta {
private tmplSvc;
private langSvc;
private publisher;
private contentPage;
private pageOutput;
private site;
private resources;
private _paginator;
private _processedContent;
constructor(tmplSvc: Template, langSvc: LanguageService, publisher: Publisher, contentPage: ContentPage, site: Site);
processResources(pageSources: PageSource[]): Promise<void>;
render(): Promise<void>;
getPageOutput(): PageOutput;
renderPage(): Promise<void>;
private renderAndWritePage;
renderResources(): Promise<void>;
private errorf;
private sprintf;
clone(): Page;
pageIdentity(): import("@internal/domain/content").PageIdentity;
pageFile(): import("@internal/domain/content").File;
staleVersions(): number[];
section(): string;
paths(): import("../../paths").Path;
path(): string;
slug(): string;
file(): import("@internal/domain/content").File;
name(): string;
title(): string;
kind(): string;
scratch(): Scratch;
get Scratch(): Scratch;
IsAncestor(other: Page): boolean;
get Title(): string;
get Section(): string;
get LinkTitle(): string;
get IsSection(): boolean;
get IsPage(): boolean;
get Content(): Promise<any>;
WikilinkContent(): Promise<any>;
Summary(): Promise<string>;
ReadingTime(): Promise<number>;
WordCount(): Promise<number>;
Backlinks(): Promise<Page[]>;
OutgoingLinks(): string[];
get Description(): string;
get Date(): Date;
get LocalDate(): String;
get RelPermalink(): string;
get GitInfo(): {};
get File(): {
BaseFileName: string;
OriginalBaseName: string;
Dir: string;
};
isHome(): boolean;
get IsHome(): boolean;
isPage(): boolean;
isSection(): boolean;
isAncestor(other: ContentPage): boolean;
eq(other: ContentPage): boolean;
isBundled(): boolean;
layouts(): string[];
output(): PageOutput;
pageOutputs(): PageOutput[];
truncated(): boolean;
get Truncated(): boolean;
parent(): ContentPage | null;
pages(): Promise<Pages>;
isStale(): boolean;
clearStale(): void;
prevInSection(): ContentPage | null;
nextInSection(): ContentPage | null;
sections(langIndex: number): Pages;
regularPages(): Promise<Pages>;
regularPagesRecursive(): Pages;
terms(langIndex: number, taxonomy: string): Promise<Pages | null>;
isTranslated(): Promise<boolean>;
translations(): Promise<Pages>;
rawContent(): string;
description(): string;
params(): Record<string, any>;
pageBaseUrl(): string;
pageWeight(): number;
pageDate(): Date;
publishDate(): Date;
get PublishDate(): Date;
relatedKeywords(cfg: any): Promise<import("@internal/domain/content").Keyword[]>;
shouldList(global: boolean): boolean;
shouldListAny(): boolean;
noLink(): boolean;
organization(): import('@internal/domain/content').Organization | undefined;
author(): import('@internal/domain/content').Author | undefined;
menu(): import('@internal/domain/content').Menu | undefined;
current(): Promise<Pager>;
setCurrent(current: Pager): void;
posOffset(offset: number): Promise<Position>;
paginator(): Promise<Pager>;
paginate(groups: PageGroups): Promise<Pager>;
paginate(pages: Pages): Promise<Pager>;
get Plain(): string;
get TableOfContents(): string;
get Params(): Record<string, any>;
get Site(): Site;
get Sites(): {
First: Site;
Default: Site;
};
get Lastmod(): Date | null;
get Sitemap(): {
ChangeFreq: string;
Priority: number;
Filename: string;
};
get IsTranslated(): Promise<boolean>;
Paginator(): Promise<SitePager | null>;
Paginate(pages: Page[]): Promise<SitePager | null>;
setupCurrentPaginator(): Promise<void>;
get Language(): {
Lang: string;
LanguageName: string;
Title: string;
Weight: number;
};
get Permalink(): string;
sitePages(ps: ContentPage[]): Page[];
private sitePage;
private pathJoin;
private joinURL;
Translations(): Promise<Page[]>;
GetTerms(taxonomy: string): Promise<Page[]>;
Pages(): Promise<Page[]>;
get Page(): ContentPage;
get Kind(): string;
get Type(): string;
get Parent(): Page | null;
getSitePages(): Promise<Page[]>;
}