summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Pelz <pelzflorian@pelzflorian.de>2017-06-01 10:32:04 +0200
committerFlorian Pelz <pelzflorian@pelzflorian.de>2017-06-01 11:55:39 +0200
commit8869ce13da6d2eec120c5d24c65793a1ad7390fe (patch)
treecab832eed1610e264e0483f029a51306fb5fbc00
parenta6a8a74465e16dc628195962e3bb778b5dfe67b9 (diff)
Reference Atom feeds in header.
-rw-r--r--haunt.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/haunt.scm b/haunt.scm
index 96b3b9b..d6aeb0b 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -54,6 +54,7 @@
(german-translations
'(("← Back to home page" . "← Zurück zur hauptseite")
("@ietf-lang-tag" . "de")
+ ("My blog in English" . "Mein blog auf deutsch")
("Git Projects" . "Git-projecte")
("Old stuff" . "Alter kram")
("GTK+ Workshop 2016" . "GTK+-Workshop 2016")
@@ -211,6 +212,15 @@
(@ (rel "stylesheet")
(type "text/css")
(href ,(build-url (list css-dir filename))))))
+ (define (link-to-feed lingua)
+ (let ((current-lingua lingua))
+ `(link
+ (@ (rel "alternate")
+ (type "application/atom+xml")
+ (title ,(_ "My blog in English"))
+ (hreflang ,lingua)
+ (href
+ ,(build-url (list feeds-dir lingua "feed.xml")))))))
`((doctype "html")
(html
(@ (lang ,(_ "@ietf-lang-tag")))
@@ -225,6 +235,13 @@
(type "image/png")
(href
,(build-url (list image-dir "favicon.png")))))
+ ;; reference Atom feeds for all linguas, current lingua on top
+ ,(link-to-feed current-lingua)
+ ,(map (lambda (lingua)
+ (if (not (equal? lingua current-lingua))
+ (link-to-feed lingua)
+ ""))
+ linguas)
,(link-to-css "common.css"))
(body
(div (@ (id "top-bar"))