summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedict Eastaugh <benedict@eastaugh.net>2011-03-29 17:58:44 +0100
committerBenedict Eastaugh <benedict@eastaugh.net>2011-03-29 17:58:44 +0100
commitaa3b3139864bc8c9b6e78dae0deadef3f3d6d4c3 (patch)
tree7713240aa4c9b1356987c0aa921eba0f5213304d
parent4d7b8896950fa82d3ef0242e3a2e7d6e4149e64b (diff)
downloadhakyll-aa3b3139864bc8c9b6e78dae0deadef3f3d6d4c3.tar.gz
Update tagblog example and show how to use an item's body field in the description for RSS and Atom feed entries.
-rw-r--r--examples/tagblog/hakyll.hs2
-rw-r--r--examples/tagblog/posts/2009-11-05-a-first-post.markdown2
-rw-r--r--examples/tagblog/posts/2009-11-10-another-post.markdown2
-rw-r--r--examples/tagblog/posts/2009-11-28-a-third-post.markdown2
-rw-r--r--examples/tagblog/posts/2009-12-04-this-blog-aint-dead.markdown2
-rw-r--r--examples/tagblog/posts/2009-12-23-almost-christmas.markdown2
6 files changed, 6 insertions, 6 deletions
diff --git a/examples/tagblog/hakyll.hs b/examples/tagblog/hakyll.hs
index 447f232..976a017 100644
--- a/examples/tagblog/hakyll.hs
+++ b/examples/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
diff --git a/examples/tagblog/posts/2009-11-05-a-first-post.markdown b/examples/tagblog/posts/2009-11-05-a-first-post.markdown
index 13d39f6..3c9d4ab 100644
--- a/examples/tagblog/posts/2009-11-05-a-first-post.markdown
+++ b/examples/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.
diff --git a/examples/tagblog/posts/2009-11-10-another-post.markdown b/examples/tagblog/posts/2009-11-10-another-post.markdown
index 4f0b62b..2fffc7c 100644
--- a/examples/tagblog/posts/2009-11-10-another-post.markdown
+++ b/examples/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
diff --git a/examples/tagblog/posts/2009-11-28-a-third-post.markdown b/examples/tagblog/posts/2009-11-28-a-third-post.markdown
index f696620..afabcc7 100644
--- a/examples/tagblog/posts/2009-11-28-a-third-post.markdown
+++ b/examples/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
diff --git a/examples/tagblog/posts/2009-12-04-this-blog-aint-dead.markdown b/examples/tagblog/posts/2009-12-04-this-blog-aint-dead.markdown
index 11ec505..0c56146 100644
--- a/examples/tagblog/posts/2009-12-04-this-blog-aint-dead.markdown
+++ b/examples/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
diff --git a/examples/tagblog/posts/2009-12-23-almost-christmas.markdown b/examples/tagblog/posts/2009-12-23-almost-christmas.markdown
index aa7e473..78a1508 100644
--- a/examples/tagblog/posts/2009-12-23-almost-christmas.markdown
+++ b/examples/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