UNPKG

@mdfriday/foundry

Version:

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

105 lines (104 loc) 4.03 kB
import { Page } from './page'; import { Publisher } from './publisher'; import { URL } from './url'; import { Ref } from './ref'; import { Language } from './language'; import { Navigation } from './navigation'; import { Page as ContentPage } from '../../content/type'; import { Compiler, ConfigService, ContentService, FsService, LanguageService, SitemapService, Template, TranslationService } from '../type'; import { Author } from '../valueobject/author'; import { Organization } from '../valueobject/organization'; import { TaxonomyList } from "@internal/domain/site/entity/taxonomies-builder"; import { Menus } from "@internal/domain/site/valueobject/menu"; import { PageGraph } from './pagegraph'; export declare class Site { private configSvc; private contentSvc; private translationSvc; private languageSvc; private sitemap; private staticCopySvc; private publisher; private template; private author; private organization; private compiler; private url; ref: Ref | null; private language; navigation: Navigation | null; private title; private home; private pageGraph; get Title(): string; get Description(): string; get Compiler(): Compiler; get IsGoogleAnalyticsEnabled(): boolean; get GoogleAnalyticsID(): string; get IsGoogleAnalyticsRespectDoNotTrack(): boolean; get IsDisqusEnabled(): boolean; get DisqusShortname(): string; get IsXRespectDoNotTrack(): boolean; get IsXDisableInlineCSS(): boolean; get ConfiguredSocialPlatforms(): string[]; GetSocialLink(platformId: string): string; GetSocialTitle(platformId: string): string; Pages(): Promise<Page[]>; RegularPages(): Promise<Page[]>; constructor(configSvc: ConfigService, contentSvc: ContentService, translationSvc: TranslationService, languageSvc: LanguageService, sitemap: SitemapService, staticCopySvc: FsService, publisher: Publisher, author: Author, organization: Organization, compiler: Compiler, url: URL, ref: Ref | null, language: Language, navigation: Navigation | null, title: string); build(template: Template): Promise<void>; renderAllLanguages(): Promise<void>; buildWithProgress(template: Template, onProgress?: (progress: { currentPage: number; totalPages: number; }) => void): Promise<void>; private setup; render(): Promise<void>; private renderWithProgress; private renderPages; private renderPagesWithProgress; private pageOutput; private clearSiteCache; translate(translationID: string): string; get Home(): Page | null; get Params(): Record<string, any>; get Taxonomies(): TaxonomyList; get Menus(): Menus; getTitle(): string; setTitle(title: string): void; getConfigService(): ConfigService; getContentService(): ContentService; getLanguageService(): LanguageService; baseURL(): string; get BaseURL(): string; getURL(): URL; getRef(): Ref; getLanguage(): Language; get Language(): Language; get LanguageCode(): string; get Languages(): Language[]; getNavigation(): Navigation; getPublisher(): Publisher; getTemplate(): Template | null; get Author(): Author; get Organization(): Organization; getCompiler(): Compiler; getSitemap(): SitemapService; isMultipleLanguage(): boolean; get IsMultilingual(): boolean; getCurrentLanguage(): string; languagePrefix(): string; sitePage(target: ContentPage): Promise<Page>; private sitePages; sitePageSync(contentPage: ContentPage): Page; private generateNavigations; GetPage(...ref: string[]): Page | null; copyStaticFiles(): Promise<void>; siteWeightedPage(ordinalWeightPage: any): Promise<any>; private buildPageGraph; private collectResourceSlugs; ProcessWikilinks(srcSlug: string, html: string): Promise<string>; getPageGraph(): PageGraph | null; GetBacklinks(targetSlug: string): string[]; GetContentIndex(): Promise<Map<string, any>>; }