Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Sitemap #1202

Open
arguiot opened this issue Jun 11, 2020 · 2 comments
Open

Generate Sitemap #1202

arguiot opened this issue Jun 11, 2020 · 2 comments

Comments

@arguiot
Copy link
Contributor

arguiot commented Jun 11, 2020

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.

@andyb1979
Copy link

andyb1979 commented Dec 14, 2023

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> 
...

@johnfairh
Copy link
Collaborator

That's great - would be a fairly simple piece of Ruby work to integrate that for anyone was interested!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants