If you're a user of the Jigsaw static site generation tool from Tighten, Matt Stauffer has a new post to his site that could come in handy. He shows how to automatically create a sitemap.
There are a few tasks that are still pretty tough with static sites—for example, search, and submitting forms (which we're trying to fix with FieldGoal). But there are other tasks that are tough-but-possible, and key among them are RSS and sitemaps. Let's start with sitemaps.
There was a feature recently added to help with this allowing you to add extra "hooks" to fire when the site builds. Matt makes use of this (and this package) to create a GenerateSitemap
class that goes through each item in the site and adds a link to the sitemap.xml
file. He shares the code for this class and the updates to make to the configuration and bootstrapping to correctly load the class.