Skip to content

Commit 20aa8bb

Browse files
viperetseantomburkeactions-user
authored
Added option to return sub-sitemap URLs in results (#161)
* Added option to return sub-sitemap URLs in results * Add prepare script to run build before packaging * fix: correct typo in SitemapperResponse interface and type definition * feat: added SitemapperOptions.proxyAgent in sitemapper.d.ts * Moving example to ReadMe * Fixing typscript issue * Update package-lock.json * Removing prepare for now * 3.3.3 --------- Co-authored-by: seantomburke <seantomburke@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
1 parent 9168ba2 commit 20aa8bb

File tree

6 files changed

+47
-3692
lines changed

6 files changed

+47
-3692
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ You can add options on the initial Sitemapper object when instantiating it.
8484
- `exclusions`: (Array<RegExp>) - Array of regex patterns to exclude URLs from being processed
8585
- `fields`: (Object) - An object of fields to be returned from the sitemap. Leaving a field out has the same effect as `<field>: false`. If not specified sitemapper defaults to returning the 'classic' array of urls. Available fields:
8686
- `loc`: (Boolean) - The URL location of the page
87+
- `sitemap`: (Boolean) - The URL of the sitemap containing the URL, userful if <sitemapindex> was used in the sitemap
8788
- `lastmod`: (Boolean) - The date of last modification of the page
8889
- `changefreq`: (Boolean) - How frequently the page is likely to change
8990
- `priority`: (Boolean) - The priority of this URL relative to other URLs on your site
@@ -132,7 +133,9 @@ const sitemapper = new Sitemapper({
132133
fields: {
133134
loc: true,
134135
lastmod: true,
135-
changefreq: true,
136136
priority: true,
137+
changefreq: true,
138+
sitemap: true,
137139
},
140+
});
138141
```

0 commit comments

Comments
 (0)