about summary refs log tree commit diff
path: root/src/Blog.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@googlemail.com>2012-03-23T23·32+0100
committerVincent Ambo <tazjin@googlemail.com>2012-03-23T23·32+0100
commitefbec9ff76ada0e59f8fc5c37a4c2734ccbf7ce2 (patch)
tree1b61546620799319152f27c08aeefab3321335db /src/Blog.hs
parenta405e185bac6673645d96defb3800b7a18ca351d (diff)
* added RSS.hs: functions to create an RSS feed
* added RSS feed handler
* FromReqURI instance for BlogLang
* fixed RSS-feed link
Diffstat (limited to 'src/Blog.hs')
-rw-r--r--src/Blog.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Blog.hs b/src/Blog.hs
index f0760f0a0215..208552c10e24 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -42,7 +42,7 @@ blogTemplate :: BlogLang -> Text -> Html -> Html
 blogTemplate lang t_append body = H.docTypeHtml $ do --add body
     H.head $ do
         H.title $ (toHtml $ blogTitle lang t_append)
-        H.link ! A.rel "alternate" ! A.type_ "application/rss+xml" ! A.title "RSS-Feed" ! A.href "/rss"
+        H.link ! A.rel "alternate" ! A.type_ "application/rss+xml" ! A.title "RSS-Feed" ! A.href (toValue feedURL)
         H.link ! A.rel "stylesheet" ! A.type_ "text/css" ! A.href "/static/blogv312.css" ! A.media "all"
         --H.link ! A.rel "stylesheet" ! A.type_ "text/css" ! A.href "/res/blogstyle.css" ! A.media "all"
         H.meta ! A.httpEquiv "content-type" ! A.content "text/html;charset=UTF-8"
@@ -72,6 +72,7 @@ blogTemplate lang t_append body = H.docTypeHtml $ do --add body
             toHtml $ orText lang
             H.a ! A.class_ "link" ! A.href (toValue imu) ! A.target "_blank" $ "iMessage"
             "."
+        feedURL = "/" ++ show lang ++ "/rss"
 
 renderEntries :: Bool -> [Entry] -> Text -> Maybe Html -> Html
 renderEntries showAll entries topText footerLinks = do