From 7e247c4dd3bd3c24e4eb0bd3aae7d1618b0a9034 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Tue, 4 Aug 2015 16:03:26 +0200
Subject: RSS link attributes

---
 provider/templates/default.html | 1 +
 src/Site.hs                     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/provider/templates/default.html b/provider/templates/default.html
index 0476655..5bc0e9f 100644
--- a/provider/templates/default.html
+++ b/provider/templates/default.html
@@ -11,6 +11,7 @@
   <![endif]-->
   <link rel="stylesheet" href="/css/default.css">
   <link rel="stylesheet" href="/css/syntax.css">
+  $if(rss)$<link rel="alternate" type="application/atom+xml" href="$rss$" title="Atom 1.0">$endif$
 </head>
 <body>
 $if(title)$
diff --git a/src/Site.hs b/src/Site.hs
index cbdf2d8..241f596 100644
--- a/src/Site.hs
+++ b/src/Site.hs
@@ -38,6 +38,7 @@ main = hakyllWith config $ do
     compile $ do
       let ctx = mconcat [ constField "title" tag
                         , listField "posts" defaultContext $ chronological =<< loadAll pattern
+                        , constField "rss" $ "/rss" </> tagTranslation tag <.> "rss"
                         , defaultContext
                         ]
       makeItem ""
@@ -62,6 +63,7 @@ main = hakyllWith config $ do
     compile $ do
       let ctx = mconcat [ listField "tags" defaultContext $ mapM (\(k, _) -> renderTag k tags) $ tagsMap tags
                         , constField "title" "Index"
+                        , constField "rss" "/rss/all-posts.rss"
                         , defaultContext
                         ]
       item <- getResourceBody
-- 
cgit v1.2.3