Sitemapamic: an XML sitemap generator for Statamic

We have released a number of useful addons for Statamic, and we'd like to introduce you to Sitemapamic: a handy addon that makes light work out of creating an XML sitemap for your Statamic site.
Sitemapamic: an XML sitemap generator for Statamic

Statamic is an incredible content management system that we use for the majority of our new projects – it works so well for sites of all shapes and sizes, from simple single page websites through to more detailed and content-heavy sites. Out of the box it can do so much, and is highly extensible to allow for developers to expand its featureset. Like what we did with Sitemapamic, one of our open source addons for Statamic!

What does Sitemapamic do? 

Sitemapamic is quite simple: it creates an XML sitemap for your site, which gets used by search engines to know what URLs exist in your site, when they were last updated, and also provide hints as to how often they get updated or their priority.

While search engines may not strictly follow the change frequency and priority, it’s at least handy to know that Sitemapamic can include them.

Sitemapamic includes:

  • Entries like content pages and blog posts,

  • Taxonomy Term Listings, like Tags or Categories you may use for a specific Collection

  • Global Taxonomy Term Listings that could be used in many Collections

  • Dynamic Routes, like those created as part of your own custom dev for your site

Entries and Taxonomy Term Listings can be easily configured in Sitemapamic’s configuration file, and Dynamic Routes from a Service Provider in your app. Don’t worry: it’s all really easy to get started with.

This gives you the ability to have many different content types included in your sitemap, and provide search engines with the most complete and up-to-date picture of your site.

To help keep your site running swiftly, Sitemapamic also caches your sitemap so that repeated visits remain snappy – and automatically updates when you make any content changes to your site.

Who is Sitemapamic for?

Sitemapamic can be for anyone running a Statamic site – it is aimed at the developer to install as part of the development process. If you’re a content author, you won’t know Sitemapamic is even there: it all runs behind the scenes to generate that sitemap.xml file.

Getting started

Statamic is easy to install using Composer – if you’re a developer already, you’ll know what this means. After installation, publish the config file and you’re good to go!

For full installation instructions, check out Sitemapamic on the Statamic Marketplace. It’s free and open source too!

After you’re installed and you have published the config file, you can tweak the config to meet your site’s Collection and Taxonomy requirements.

The documentation for Sitemapamic, found on the Statamic Marketplace or Github, has all the information needed to get you started with your config – including examples in the config file to help you out.

You can also define your dynamic routes, if you’re using them, to help index other parts of your site that aren’t in Statamic itself. Check out the Dynamic Routes section of the documentation for full details.

If you’re wanting to take advantage of Entry/Term-specific options, like change frequency and priority, you can add some specific fields to your Blueprint to allow you to tweak these values per specific content type – really handy if there’s just one or two Entries you want to hide from your sitemap.

Sitemapamic is full of flexibility to generate a sitemap that works for your site and your content – however you have it structured. We’re always updating it too: your input helps evolve and shape it, so say hello!

How to get Sitemapamic

Sitemapamic can be installed using Composer, with full details on the Sitemapamic page on the Statamic Marketplace or on Github.

If you’re a Sitemapamic user, reach out and say hi – we’d love to hear from you!

Marty Friedel

Marty Friedel

Marty has a background in Computer and Information Science, software development, web development, multimedia and web accessibility, and is Mity Digital’s resident nerd.

Outside of his programming work, Marty is a keen landscape photographer, and also teaches Les Mills group fitness classes.