TL;DR
I just released generate-sitemap 1.9.1, a GitHub Action for generating XML sitemaps for static websites. The generate-sitemap GitHub Action is implemented in Python, and generates an XML sitemap by crawling the GitHub repository containing the html of the site, using commit dates to generate <lastmod>
tags in the sitemap.
Changelog 1.9.1 - 2023-01-16
Fixed
- Case-insensitive check for
<meta name="robots" content="noindex">
in head of html files. - Correct handling of
<meta content="noindex" name="robots">
(i.e., content before name).
Dependencies
- Bump cicirello/pyaction from 4.12.0 to 4.14.1
More Information
To learn more, see my earlier post about generate-sitemap here on DEV:
Generate an XML Sitemap for a Static Website in GitHub Actions
Vincent A. Cicirello ・ Nov 23 '22 ・ 3 min read
You can find the source code and documentation for using in a GitHub workflow in the GitHub repository:
cicirello / generate-sitemap
Generate an XML sitemap for a GitHub Pages site using GitHub Actions
generate-sitemap
Check out all of our GitHub Actions: https://actions.cicirello.org/
About
The generate-sitemap GitHub action generates a sitemap for a website hosted on GitHub Pages, and has the following features:
- Support for both xml and txt sitemaps (you choose using one of the action's inputs).
- When generating an xml sitemap, it uses the last commit date of
each file to generate the
<lastmod>
tag in the sitemap entry. If the file was created during that workflow run, but not yet committed, then it instead uses the current date (however, we recommend if possible committing newly created files first). - Supports URLs for html and pdf files in the sitemap, and has inputs to control the included file types (defaults include both html and pdf files in the sitemap).
- Now also supports including URLs for a user specified list of additional file extensions in the sitemap.
- …
For more information on generate-sitemap and other actions, see this website about the GitHub Actions that I maintain:
Where You Can Find Me
Follow me here on DEV:
Follow me on GitHub:
Vincent A Cicirello
If you want to generate the equivalent to the above for your own GitHub profile, check out the cicirello/user-statistician GitHub Action.
Or visit my website:
Top comments (0)