Skip to content
Browse files

Update tagblog example and show how to use an item's body field in th…

…e description for RSS and Atom feed entries.
  • Loading branch information...
1 parent fd6bbf3 commit d9c78b9e1e0599079f1a5e24994def3a2f17ec89 @beastaugh beastaugh committed Mar 29, 2011
View
2 tagblog/hakyll.hs
@@ -4,7 +4,6 @@ module Main where
import Prelude hiding (id)
import Control.Arrow ((>>>), (***), arr)
import Control.Category (id)
-import Control.Monad (forM_)
import qualified Data.Map as M
import Data.Monoid (mempty, mconcat)
@@ -61,6 +60,7 @@ main = hakyll $ do
route "rss.xml" $ idRoute
create "rss.xml" $
requireAll_ "posts/*"
+ >>> mapCompiler (arr $ copyBodyToField "description")
>>> renderRss feedConfiguration
-- Read templates
View
2 tagblog/posts/2009-11-05-a-first-post.markdown
@@ -2,8 +2,8 @@
title: A first post
author: Julius Caesar
tags: caesar, random crap
-description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
---
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pretium leo
adipiscing lectus iaculis lobortis. Vivamus scelerisque velit dignissim metus
gravida sit amet dapibus ligula tempor. Quisque sit amet viverra nunc.
View
2 tagblog/posts/2009-11-10-another-post.markdown
@@ -2,8 +2,8 @@
title: Another post
author: Marcus Tullius Cicero
tags: cicero, random crap
-description: Vestibulum in ultrices urna.
---
+
Vestibulum in ultrices urna. Etiam tempor enim dui, nec malesuada elit. Donec
tempor ligula et quam volutpat quis fermentum eros congue. Sed ut pulvinar sem.
Sed aliquam ipsum id purus sollicitudin vulputate. Cras et mauris dui, vel
View
2 tagblog/posts/2009-11-28-a-third-post.markdown
@@ -2,8 +2,8 @@
title: A third post
author: Publius Ovidius Naso
tags: epic fail, ovidius
-description: Pellentesque tempor blandit elit, vel ultricies arcu congue egestas.
---
+
Pellentesque tempor blandit elit, vel ultricies arcu congue egestas. Fusce
vitae rutrum nisl. Fusce id mauris libero, a venenatis tellus. Fusce iaculis,
lorem et ornare molestie, mauris risus mollis nisi, non fermentum lacus lacus
View
2 tagblog/posts/2009-12-04-this-blog-aint-dead.markdown
@@ -2,8 +2,8 @@
title: This blog ain't dead
author: Marcus Antonius
tags: epic fail, antonius
-description: Etiam non felis aliquet tellus dictum vestibulum.
---
+
Etiam non felis aliquet tellus dictum vestibulum. Aliquam accumsan mauris non
lacus ultricies nec lacinia enim rhoncus. Curabitur vel tortor massa, elementum
tincidunt elit. Maecenas venenatis luctus arcu ut ullamcorper. Donec interdum
View
2 tagblog/posts/2009-12-23-almost-christmas.markdown
@@ -2,8 +2,8 @@
title: Almost Christmas!
author: Publius Vergilius Maro
tags: christmas, random crap
-description: Morbi tincidunt eleifend ante, eu gravida ante rutrum vel.
---
+
Morbi tincidunt eleifend ante, eu gravida ante rutrum vel. Nunc bibendum nulla
tellus, eget egestas sapien. Nam rhoncus interdum libero, eget congue orci
imperdiet eu. Quisque pellentesque fringilla urna, ac venenatis ante ultricies

0 comments on commit d9c78b9

Please sign in to comment.
Something went wrong with that request. Please try again.