sitemap-gen: Generate XML Sitemaps & Sitemap Indexes

[ bsd3, library, web ] [ Propose Tags ]

The sitemap-gen package uses the xmlgen package to generate XML sitemaps that are compliant with the XML schema.

See the Web.Sitemap.Gen module and the README file for documentation & usage details.

[Skip to Readme]
Versions [RSS] [faq]
Change log
Dependencies base (>=4.7 && <5), text (==1.*), time (>=1.6 && <2), xmlgen (>=0.6 && <1) [details]
License BSD-3-Clause
Copyright 2019 Pavan Rikhi
Author Pavan Rikhi
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by lysergia at 2020-01-19T06:12:36Z
Distributions LTSHaskell:, NixOS:, Stackage:
Downloads 420 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-01-19 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for sitemap-gen-

[back to package description]


sitemap-gen Build Status

sitemap-gen is a Haskell library for generating XML sitemaps and sitemap index files.

It uses the xmlgen library to generate XML that conforms to the XML schema.

To use this library, build a Sitemap or SitemapIndex type and use the respective render... functions to build the ByteString output:

import Web.Sitemap.Gen (Sitemap(..), SitemapUrl(..), renderSitemap)

import qualified Data.ByteString as BS
import qualified Web.Sitemap.Gen as Sitemap

mySitemap :: BS.ByteString
mySitemap =
    let urls =
            [ SitemapUrl
                { sitemapLocation = ""
                , sitemapLastModified = Nothing
                , sitemapChangeFrequency = Just Sitemap.Monthly
                , sitemapPriority = Just 0.9
            , SitemapUrl
                { sitemapLocation = ""
                , sitemapLastModified = Nothing
                , sitemapChangeFrequency = Just Sitemap.Yearly
                , sitemapPriority = Just 0.4
    renderSitemap $ Sitemap urls


BSD-3, exceptions possible.