Generate a sitemap automatically for your site


This plugin generates a sitemap.xml file automatically with all your pages, which is useful for SEO. It also creates a robots.txt file that include a link to the sitemap file, so it's easier to discover for the search engines.


Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import sitemap from "lume/plugins/sitemap.ts";

const site = lume();


export default site;

See all available options in Deno Doc.


Internally, this plugin uses Search to search and return the pages. By default, all pages are included in the sitemap (except the 404 page) and sorted by URL. You can setup a different configuration:

  filename: "my-sitemap.xml", // to change the sitemap filename
  query: "indexable=true", // Select only pages with the indexable attribute as true
  sort: "date=desc", // To sort by data in ascendent order