jazzy
jazzy copied to clipboard
Generate Sitemap
I don't see any options to generate a Sitemap and I thought it would be a very interesting feature to add to Jazzy.
As most people type their questions into Google, letting search engines discover all the pages could help.
Since sitemaps are XML files, it would fairly easy to generate.
Same question. I managed to generate a sitemap.xml for a Jazzy created site in post-processing
Here's our site for an iOS Chart library. This needed a sitemap to allow crawlers (internal and external) to find content.
Anyway here's the bash script I generated to create a sitemap recursively from Jazzy outputted documentation. To call it, pass the root folder and URL root.
.\build_sitemap.sh /path/to/jazzy/output https://www.mysite.com/where-are-the-docs/
this outputs a sitemap.xml like this. The lastmod field is taken from the current date/time at the point the sitemap is generated. changefreq and priority are hard coded.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.scichart.com/documentation/ios/current/2d-chart-types---uniform-heatmap-series.html</loc>
<lastmod>2023-12-14T10:42:11+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
...
That's great - would be a fairly simple piece of Ruby work to integrate that for anyone was interested!