-
Notifications
You must be signed in to change notification settings - Fork 2
/
sitemap.xml.pp
29 lines (23 loc) · 1.05 KB
/
sitemap.xml.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#lang pollen
◊(require racket/string)
◊(require pollen/pagetree)
◊(define pagelist (pagetree->list (get-pagetree "index.ptree")))
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://sanchom.github.io</loc>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://sanchom.github.io/site-index.html</loc>
<changefreq>daily</changefreq>
</url>
◊(apply string-append (map (lambda (x)
(string-join `(,(format "<url>\n<loc>https://sanchom.github.io/~a</loc>\n" x)
,(if (select 'edited-date x) (format "<lastmod>~a</lastmod>\n" (select 'edited-date x))
(if (select 'original-date x) (format "<lastmod>~a</lastmod>\n" (select 'original-date x)) ""))
"<changefreq>weekly</changefreq>\n</url>\n\n")
""
))
pagelist))
</urlset>