summaryrefslogtreecommitdiff
path: root/web/tutorials/05-snapshots-feeds.markdown
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-01-12 16:34:48 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-01-12 16:34:48 +0100
commit3ae0c088f22fef27bf73cbc6508e91431f970118 (patch)
treed5239025e3ede4e6a8ea5fe183521dc4fd1b2ad1 /web/tutorials/05-snapshots-feeds.markdown
parent5738a987d3fce62b35a9959ab38075f8c410b467 (diff)
downloadhakyll-3ae0c088f22fef27bf73cbc6508e91431f970118.tar.gz
Start feed tutorial…
Diffstat (limited to 'web/tutorials/05-snapshots-feeds.markdown')
-rw-r--r--web/tutorials/05-snapshots-feeds.markdown39
1 files changed, 39 insertions, 0 deletions
diff --git a/web/tutorials/05-snapshots-feeds.markdown b/web/tutorials/05-snapshots-feeds.markdown
new file mode 100644
index 0000000..d113aa2
--- /dev/null
+++ b/web/tutorials/05-snapshots-feeds.markdown
@@ -0,0 +1,39 @@
+---
+title: Snapshots, and how to produce an RSS/Atom feed
+author: Jasper Van der Jeugt
+---
+
+Basic feed configuration
+------------------------
+
+Hakyll has built-in support for two types of feeds: RSS and Atom. This tutorial
+explains how you can add these to your blog or website. The first step is to
+define a `FeedConfiguration` to set some basic options. For example, a cooking
+blog may have the following declaration:
+
+```haskell
+myFeedConfiguration :: FeedConfiguration
+myFeedConfiguration = FeedConfiguration
+ { feedTitle = "Healthy cooking: latest recipes"
+ , feedDescription = "This feed provides fresh recipes for fresh food!"
+ , feedAuthorName = "John Doe"
+ , feedAuthorEmail = "test@example.com"
+ , feedRoot = "http://healthycooking.example.com"
+ }
+```
+
+Now, we'll create the actual feed.
+
+```haskell
+renderAtom :: FeedConfiguration
+ -> Context String
+ -> [Item String]
+ -> Compiler (Item String)
+```
+
+```haskell
+renderRss :: FeedConfiguration
+ -> Context String
+ -> [Item String]
+ -> Compiler (Item String)
+```