UNPKG

972 BTypeScriptView Raw
1import { ExtendedRequest, ExtendedResponse, KeywordMapper, SiteMeta } from "./common";
2export interface SeoOptions {
3 useCache?: boolean;
4 defaultCache?: string[];
5 test?: boolean;
6 altHost?: string;
7}
8export interface SeoSubDirOptions {
9 subDir: boolean;
10 subDirBase: string;
11 subDirOptional: boolean;
12}
13export declare class SeoMiddleware {
14 private siteId;
15 private options;
16 private subDirOptions;
17 constructor(siteId: string, options: SeoOptions, subDirOptions: SeoSubDirOptions);
18 getHtml(url: string, locale: string, html?: string): Promise<string>;
19 getFromCache(url: string, skip: boolean, callback: (e?: Error, html?: string, isValid?: boolean) => void): void;
20 middleware(): (meta: SiteMeta, keywordsByLocale: KeywordMapper, reverseKeywordByLocale: KeywordMapper, req: ExtendedRequest, res: ExtendedResponse, next: () => void) => void;
21}
22export declare function setRenderServer(url: string): void;