Gathering detailed insights and metrics for gatsby-plugin-advanced-sitemap
Gathering detailed insights and metrics for gatsby-plugin-advanced-sitemap
Gathering detailed insights and metrics for gatsby-plugin-advanced-sitemap
Gathering detailed insights and metrics for gatsby-plugin-advanced-sitemap
gatsby-plugin-advanced-sitemap-patch
Advanced plugin for generating configurable XML sitemaps with linked media for better SEO and human-readable XSL templates.
gatsby-plugin-advanced-sitemap-modest
Identical to advanced-sitemap but without the ghost link at the top of the page
gatsby-plugin-advanced-sitemap-nonjene-hotfix
Advanced plugin for generating configurable XML sitemaps with linked media for better SEO and human-readable XSL templates.
@auratiger/gatsby-plugin-advanced-sitemap
Advanced plugin for generating configurable XML sitemaps with linked media for better SEO and human-readable XSL templates.
npm install gatsby-plugin-advanced-sitemap
Typescript
Module System
Min. Node Version
JavaScript (84.39%)
XSLT (15.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
149 Stars
314 Commits
10 Watchers
2 Branches
48 Contributors
Updated on Jun 19, 2025
Latest Version
2.1.0
Package Id
gatsby-plugin-advanced-sitemap@2.1.0
Unpacked Size
88.04 kB
Size
24.32 kB
File Count
54
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
The default Gatsby sitemap plugin generates a simple blob of raw XML for all your pages. This advanced sitemap plugin adds more power and configuration, generating a single or multiple sitemaps with full XSL templates to make them neatly organised and human + machine readable, as well linking image resources to encourage media indexing.
Demo: https://gatsby.ghost.org/sitemap.xml
NOTE: This plugin only generates output in production
mode! To test, run: gatsby build && gatsby serve
npm install --save gatsby-plugin-advanced-sitemap
By default this plugin will generate a single sitemap of all pages on your site, without any configuration needed.
1// gatsby-config.js 2 3siteMetadata: { 4 siteUrl: `https://www.example.com`, 5}, 6plugins: [ 7 `gatsby-plugin-advanced-sitemap` 8]
If you want to generate advanced, individually organised sitemaps based on your data, you can do so by passing in a query and config. The example below uses Ghost, but this should work with any data source - including Pages, Markdown, Contentful, etc.
Example:
1// gatsby-config.js 2 3plugins: [ 4 { 5 resolve: `gatsby-plugin-advanced-sitemap`, 6 options: { 7 // 1 query for each data type 8 query: ` 9 { 10 allGhostPost { 11 edges { 12 node { 13 id 14 slug 15 updated_at 16 feature_image 17 } 18 } 19 } 20 allGhostPage { 21 edges { 22 node { 23 id 24 slug 25 updated_at 26 feature_image 27 } 28 } 29 } 30 allGhostTag { 31 edges { 32 node { 33 id 34 slug 35 feature_image 36 } 37 } 38 } 39 allGhostAuthor { 40 edges { 41 node { 42 id 43 slug 44 profile_image 45 } 46 } 47 } 48 }`, 49 // The filepath and name to Index Sitemap. Defaults to '/sitemap.xml'. 50 output: "/custom-sitemap.xml", 51 mapping: { 52 // Each data type can be mapped to a predefined sitemap 53 // Routes can be grouped in one of: posts, tags, authors, pages, or a custom name 54 // The default sitemap - if none is passed - will be pages 55 allGhostPost: { 56 sitemap: `posts`, 57 // Add a query level prefix to slugs, Don't get confused with global path prefix from Gatsby 58 // This will add a prefix to this particular sitemap only 59 prefix: 'your-prefix/', 60 // Custom Serializer 61 serializer: (edges) => { 62 return edges.map(({ node }) => { 63 (...) // Custom logic to change final sitemap. 64 }) 65 } 66 }, 67 allGhostTag: { 68 sitemap: `tags`, 69 }, 70 allGhostAuthor: { 71 sitemap: `authors`, 72 }, 73 allGhostPage: { 74 sitemap: `pages`, 75 }, 76 }, 77 exclude: [ 78 `/dev-404-page`, 79 `/404`, 80 `/404.html`, 81 `/offline-plugin-app-shell-fallback`, 82 `/my-excluded-page`, 83 /(\/)?hash-\S*/, // you can also pass valid RegExp to exclude internal tags for example 84 ], 85 createLinkInHead: true, // optional: create a link in the `<head>` of your site 86 addUncaughtPages: true, // optional: will fill up pages that are not caught by queries and mapping and list them under `sitemap-pages.xml` 87 additionalSitemaps: [ // optional: add additional sitemaps, which are e. g. generated somewhere else, but need to be indexed for this domain 88 { 89 name: `my-other-posts`, 90 url: `/blog/sitemap-posts.xml`, 91 }, 92 { 93 url: `https://example.com/sitemap.xml`, 94 }, 95 ], 96 } 97 } 98]
Example output of ☝️ this exact config 👉 https://gatsby.ghost.org/sitemap.xml
1yarn install
Build Plugin
1yarn build
Run Tests
1yarn test
Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
65 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More