Skip to content

Commit

Permalink
add indexFilename and jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Dec 23, 2024
1 parent 212888c commit c7ae42e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/integrations/sitemap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export type SitemapOptions =
serialize?(item: SitemapItem): SitemapItem | Promise<SitemapItem | undefined> | undefined;

xslURL?: string;
/** Allows you to configure the separator used in the sitemap file names. Defaults to `-`. */
separator?: string;
/** Allows you to configure the index file name. Defaults to `sitemap-index`. */
indexFilename?: string
}
| undefined;

Expand Down Expand Up @@ -69,8 +72,9 @@ const isStatusCodePage = (locales: string[]) => {
const createPlugin = (options?: SitemapOptions): AstroIntegration => {
let config: AstroConfig;
let separator = options?.separator ?? '-';
let indexFilename = options?.indexFilename ?? 'sitemap-index';

let outfile = `sitemap${separator}index.xml`;
let outfile = `${indexFilename}.xml`;

return {
name: PKG_NAME,
Expand Down

0 comments on commit c7ae42e

Please sign in to comment.