A sitemap generating plugin for Pretzel
C# PowerShell
Latest commit 312be3f Dec 29, 2016 @thoemmi use spaces instead of tabs

README.md

Pretzel.Sitemap

This is a plugin for Pretzel, a static site generation tool following (more or less) the same conventions as Jekyll.

The purpose of this plugin is to create a sitemap.xml file, a site map with a list of all posts and pages.

Build status

Background

Generally Pretzel recommends to use a template for sitemaps (it provides templates for both liquid and Razor), but it doesn't respect paginated pages. That's because paginated pages are not added to site.Pages but created transiently.

I wrote this plugin using the same technique as JekyllEngineBase.ProcessFile: for each post and page it adds an url entry to the sitemap. Additionally it checks the page's front-matter if paginate is specified, and adds relevant URLs to the sitemap too.

Installation

Copy Pretzel.Sitemap.csx to the _plugin folder at the root of your site folder.