@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
145 lines • 4.27 kB
TypeScript
import { Content as ContentHub, Converter, LangService, Page, PageMap, TaxonomyService, Template } from '../index';
import { Taxonomy } from './taxonomy';
import { Term } from './term';
import { Section } from './section';
import { Standalone } from './standalone';
import { Source } from './pagesource';
export declare class PageBuilder {
langSvc: LangService;
taxonomySvc: TaxonomyService;
templateSvc: Template | null;
pageMapper: PageMap | null;
taxonomy: Taxonomy;
term: Term;
section: Section;
standalone: Standalone;
converter: Converter;
contentHub: ContentHub | null;
private source;
private sourceByte;
private kind;
private singular;
private term_;
private langIdx;
private fm;
private fmParser;
private c;
private renderableDocument;
constructor(langSvc: LangService, taxonomySvc: TaxonomyService, templateSvc: Template | null, pageMapper: PageMap | null, taxonomy: Taxonomy, term: Term, section: Section, standalone: Standalone, converter: Converter, contentHub: ContentHub | null);
withSource(source: Source): PageBuilder;
/**
* WithLangIdx - exact replica of Go's WithLangIdx method
*/
withLangIdx(idx: number): PageBuilder;
/**
* Reset - exact replica of Go's reset method
*/
private reset;
/**
* Build - exact replica of Go's Build method
*/
build(): Promise<Page>;
/**
* KindBuild - exact replica of Go's KindBuild method
*/
kindBuild(): Promise<Page>;
/**
* Build internal - exact replica of Go's build method
*/
private buildInternal;
/**
* Build page - exact replica of Go's buildPage method
*/
private buildPage;
/**
* Build page with kind - exact replica of Go's buildPageWithKind method
*/
private buildPageWithKind;
/**
* Apply front matter - exact replica of Go's applyFrontMatter method
*/
private applyFrontMatter;
/**
* Build home - exact replica of Go's buildHome method
*/
private buildHome;
/**
* Build section - exact replica of Go's buildSection method
*/
private buildSection;
/**
* Build 404 - exact replica of Go's build404 method
*/
private build404;
/**
* Build sitemap - exact replica of Go's buildSitemap method
*/
private buildSitemap;
/**
* Build taxonomy - exact replica of Go's buildTaxonomy method
*/
private buildTaxonomy;
/**
* Build term - exact replica of Go's buildTerm method
*/
private buildTerm;
private render;
private parse;
/**
* Parse terms - exact replica of Go's parseTerms method
*/
private parseTerms;
/**
* Parse kind - exact replica of Go's parseKind method
*/
private parseKind;
/**
* Parse language by default - exact replica of Go's parseLanguageByDefault method
*/
private parseLanguageByDefault;
/**
* Parse language by index - exact replica of Go's parseLanguageByIdx method
*/
private parseLanguageByIdx;
/**
* Parse language - exact replica of Go's parseLanguage method
*/
private parseLanguage;
/**
* Parse front matter - exact replica of Go's parseFrontMatter method
*/
private parseFrontMatter;
/**
* Create shortcode renderer - returns a simple renderer for shortcodes
*/
private createShortcodeRenderer;
private doRenderShortcode;
private renderShortcodeMarkdown;
/**
* Build pagination - creates pagination for page
* TypeScript equivalent of Go's buildPagination method
*/
private buildPagination;
/**
* Adapt pagination - creates empty pagination for pages that don't support it
* TypeScript equivalent of Go's adaptPagination method
*/
private adaptPagination;
/**
* Build output - builds page output
*/
private buildOutput;
/**
* New page - creates a new page instance based on Go version
*/
private newPage;
/**
* New taxonomy - creates a new taxonomy page
*/
private newTaxonomy;
/**
* New term - creates a new term page
*/
private newTerm;
}
//# sourceMappingURL=pagebuilder.d.ts.map