From 4126e78f84b3d1cd407002a271b778e213ee9362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 9 Jul 2020 16:52:15 +0200 Subject: Attempt to serve everything as xml. --- module/entry-points/server.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/entry-points/server.scm') diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm index 0698daf0..398cda6b 100644 --- a/module/entry-points/server.scm +++ b/module/entry-points/server.scm @@ -68,12 +68,14 @@ (return '((content-type text/html)) (sxml->html-string '(a (@ (href "/today")) "Gå till idag")))) - (GET "/week/:start-date.html" (start-date) + (GET "/week/:start-date.:ext" (start-date ext) (let* ((start-date (start-of-week (parse-iso-date start-date) (get-config 'week-start)))) - (return '((content-type text/html)) + (return `((content-type ,(if (string=? ext "xml") + 'application/xhtml+xml + 'text/html))) (with-output-to-string (lambda () (html-generate calendars: (getf 'calendars) -- cgit v1.2.3