the validationlab.eu marketing site: 3 audience pages (en) + legal skeletons, i18n scaffold (25 locales, subdirectory scheme), structured frontmatter blocks, Zoho Flow lead forms with capability tagging + honeypot, sitemap/hreflang/JSON-LD/robots, cookie-gated analytics plumbing
This commit is contained in:
1 parent
95af7107d0
commit
477bf5114f
1076 files changed
+227743
-110
No files matched your search
+68
@@ -0,0 +1,68 @@
|
||||
import { Readable } from 'node:stream';
|
||||
import type { SitemapItemLoose, Logger } from './types.js';
|
||||
/**
|
||||
* Options for the simpleSitemapAndIndex function
|
||||
*/
|
||||
export interface SimpleSitemapAndIndexOptions {
|
||||
/**
|
||||
* The hostname for all URLs
|
||||
* Must be a valid http:// or https:// URL
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* The hostname for the sitemaps if different than hostname
|
||||
* Must be a valid http:// or https:// URL
|
||||
*/
|
||||
sitemapHostname?: string;
|
||||
/**
|
||||
* The urls you want to make a sitemap out of.
|
||||
* Can be an array of items, a file path string, a Readable stream, or an array of strings
|
||||
*/
|
||||
sourceData: SitemapItemLoose[] | string | Readable | string[];
|
||||
/**
|
||||
* Where to write the sitemaps and index
|
||||
* Must be a relative path without path traversal sequences
|
||||
*/
|
||||
destinationDir: string;
|
||||
/**
|
||||
* Where the sitemaps are relative to the hostname. Defaults to root.
|
||||
* Must not contain path traversal sequences
|
||||
*/
|
||||
publicBasePath?: string;
|
||||
/**
|
||||
* How many URLs to write before switching to a new file
|
||||
* Must be between 1 and 50,000 per sitemaps.org spec
|
||||
* @default 45000
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Whether to compress the written files
|
||||
* @default true
|
||||
*/
|
||||
gzip?: boolean;
|
||||
/**
|
||||
* Optional URL to an XSL stylesheet
|
||||
* Must be a valid http:// or https:// URL
|
||||
*/
|
||||
xslUrl?: string;
|
||||
/**
|
||||
* Receives validation warnings from the sitemap and index streams.
|
||||
* Defaults to the console; pass `false` to silence.
|
||||
*/
|
||||
logger?: Logger | false;
|
||||
}
|
||||
/**
|
||||
* A simpler interface for creating sitemaps and indexes.
|
||||
* Automatically handles splitting large datasets into multiple sitemap files.
|
||||
*
|
||||
* @param options - Configuration options
|
||||
* @returns A promise that resolves when all sitemaps and the index are written
|
||||
* @throws {InvalidHostnameError} If hostname or sitemapHostname is invalid
|
||||
* @throws {InvalidPathError} If destinationDir contains path traversal
|
||||
* @throws {InvalidPublicBasePathError} If publicBasePath is invalid
|
||||
* @throws {InvalidLimitError} If limit is out of range
|
||||
* @throws {InvalidXSLUrlError} If xslUrl is invalid
|
||||
* @throws {Error} If sourceData type is not supported
|
||||
*/
|
||||
export declare const simpleSitemapAndIndex: ({ hostname, sitemapHostname, sourceData, destinationDir, limit, gzip, publicBasePath, xslUrl, logger, }: SimpleSitemapAndIndexOptions) => Promise<void>;
|
||||
export default simpleSitemapAndIndex;
|
||||
Reference in new issue
Block a user