UNPKG

1.35 kBTypeScriptView Raw
1import { Readable } from 'stream';
2import { SitemapItemLoose } from './types';
3/**
4 *
5 * @param {object} options -
6 * @param {string} options.hostname - The hostname for all URLs
7 * @param {string} [options.sitemapHostname] - The hostname for the sitemaps if different than hostname
8 * @param {SitemapItemLoose[] | string | Readable | string[]} options.sourceData - The urls you want to make a sitemap out of.
9 * @param {string} options.destinationDir - where to write the sitemaps and index
10 * @param {string} [options.publicBasePath] - where the sitemaps are relative to the hostname. Defaults to root.
11 * @param {number} [options.limit] - how many URLs to write before switching to a new file. Defaults to 50k
12 * @param {boolean} [options.gzip] - whether to compress the written files. Defaults to true
13 * @returns {Promise<void>} an empty promise that resolves when everything is done
14 */
15export declare const simpleSitemapAndIndex: ({ hostname, sitemapHostname, sourceData, destinationDir, limit, gzip, publicBasePath, }: {
16 hostname: string;
17 sitemapHostname?: string | undefined;
18 sourceData: SitemapItemLoose[] | string | Readable | string[];
19 destinationDir: string;
20 publicBasePath?: string | undefined;
21 limit?: number | undefined;
22 gzip?: boolean | undefined;
23}) => Promise<void>;
24export default simpleSitemapAndIndex;