satelito-sample

This is a sample web site for the Satelito ssg.
git clone git://soucy.cc/satelito-sample.git
Log | Files | Refs

commit b62fd41959622e7b80b70a959fdefb01df9420a2
parent 5a8654138bbfb66aa83af6bd56223f4d556210ee
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Thu, 14 Oct 2021 11:26:37 -0400

Add the template for the sitemap.xml file

Diffstat:
Mconfig.lua | 1+
Atemplates/sitemap.xml.html | 11+++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/config.lua b/config.lua @@ -14,6 +14,7 @@ return { - paths.* - mimetypes.* ]] + sitemapxml = true, siteurl = "https://grgmelies.tld", language = "en", diff --git a/templates/sitemap.xml.html b/templates/sitemap.xml.html @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + <% if sitemap then %> + <% for _, entry in pairs(sitemap) do %> + <url> + <loc><%= entry.permalink -%></loc> + <lastmod><%- os.date('%Y-%m-%dT%H:%M:%S', entry.time_modification) -%>Z</lastmod> + </url> + <% end %> + <% end %> +</urlset>