summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-31 11:19:57 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-31 11:19:57 +0100
commit7afabf5c098efc2f0df482ab66d9091d7aa3bd23 (patch)
treea96a60459fa2d8fce6591d56d437d9da13c2b6fd /examples
parent73d6b1d6614c3965afd96b710bfa79db94d2449e (diff)
downloadhakyll-7afabf5c098efc2f0df482ab66d9091d7aa3bd23.tar.gz
Better naming scheme.
Diffstat (limited to 'examples')
-rw-r--r--examples/categoryblog/hakyll.hs6
-rw-r--r--examples/hakyll/tutorial2.markdown2
-rw-r--r--examples/hakyll/tutorial5.markdown8
-rw-r--r--examples/hakyll/tutorial6.markdown2
-rw-r--r--examples/tagblog/hakyll.hs8
5 files changed, 13 insertions, 13 deletions
diff --git a/examples/categoryblog/hakyll.hs b/examples/categoryblog/hakyll.hs
index e6d87ea..a5f3996 100644
--- a/examples/categoryblog/hakyll.hs
+++ b/examples/categoryblog/hakyll.hs
@@ -26,7 +26,7 @@ main = hakyll $ do
renderPostList "posts.html" "All posts" renderablePosts
-- Render post list per category
- mapM_ (\(category, posts) -> renderPostList (categoryToURL category) ("Posts about " ++ category) posts)
+ mapM_ (\(category, posts) -> renderPostList (categoryToUrl category) ("Posts about " ++ category) posts)
(toList categoryMap)
-- Render index, including recent posts.
@@ -51,12 +51,12 @@ main = hakyll $ do
where postManipulation :: ContextManipulation
postManipulation = renderDate "date" "%B %e, %Y" "Date unknown"
- categoryToURL category = "$root/categories/" ++ removeSpaces category ++ ".html"
+ categoryToUrl category = "$root/categories/" ++ removeSpaces category ++ ".html"
categoryList :: TagMap -> String
categoryList = uncurry categoryListItem <=< toList
- categoryListItem category posts = "<li>" ++ link category (categoryToURL category)
+ categoryListItem category posts = "<li>" ++ link category (categoryToUrl category)
++ " - " ++ show (length posts) ++ " items.</li>"
renderPostList url title posts = do
diff --git a/examples/hakyll/tutorial2.markdown b/examples/hakyll/tutorial2.markdown
index aa4bc9e..eccc721 100644
--- a/examples/hakyll/tutorial2.markdown
+++ b/examples/hakyll/tutorial2.markdown
@@ -80,7 +80,7 @@ Combining two `Renderable`s, but setting a different `url` is quite common, so
there is another function that helps us here:
~~~~~{.haskell}
-combineWithURL :: (Renderable a, Renderable b)
+combineWithUrl :: (Renderable a, Renderable b)
=> FilePath -> a -> b -> CombinedRenderable a b
~~~~~
diff --git a/examples/hakyll/tutorial5.markdown b/examples/hakyll/tutorial5.markdown
index 8ccb3bd..739d311 100644
--- a/examples/hakyll/tutorial5.markdown
+++ b/examples/hakyll/tutorial5.markdown
@@ -130,7 +130,7 @@ clickable. We can again solve this with a `ContextManipulation`. We have a
function that produces an url for a given tag:
~~~~~{.haskell}
-tagToURL tag = "$root/tags/" ++ removeSpaces tag ++ ".html"
+tagToUrl tag = "$root/tags/" ++ removeSpaces tag ++ ".html"
~~~~~
`removeSpaces` is an auxiliary function from `Text.Hakyll.File`. Now, there is
@@ -142,7 +142,7 @@ for a given tag - the function we just wrote. Let's extend our
~~~~~{.haskell}
postManipulation :: ContextManipulation
postManipulation = renderDate "date" "%B %e, %Y" "Unknown date"
- . renderTagLinks tagToURL
+ . renderTagLinks tagToUrl
~~~~~
So, the `renderTagLinks` function replaces the `$tags` value from
@@ -167,7 +167,7 @@ needs this so it can cache the tags.
~~~~~{.haskell}
tagMap <- readTagMap "postTags" postPaths
let renderListForTag (tag, posts) =
- renderPostList (tagToURL tag)
+ renderPostList (tagToUrl tag)
("Posts tagged " ++ tag)
mapM_ renderListForTag (toList tagMap)
~~~~~
@@ -193,7 +193,7 @@ Then, we give a minimum and a maximum font size in percent, and we get the
tag cloud back. We can add this to our index:
~~~~~{.haskell}
-let tagCloud = renderTagCloud tagMap tagToURL 100 200
+let tagCloud = renderTagCloud tagMap tagToUrl 100 200
index = createListingWith postManipulation "index.html"
"templates/postitem.html"
(take 3 renderablePosts)
diff --git a/examples/hakyll/tutorial6.markdown b/examples/hakyll/tutorial6.markdown
index 3ab8271..df19a64 100644
--- a/examples/hakyll/tutorial6.markdown
+++ b/examples/hakyll/tutorial6.markdown
@@ -65,7 +65,7 @@ a list item for one category:
~~~~~{.haskell}
categoryListItem category posts =
- "<li>" ++ link category (categoryToURL category)
+ "<li>" ++ link category (categoryToUrl category)
++ " - " ++ show (length posts) ++ " items.</li>"
~~~~~
diff --git a/examples/tagblog/hakyll.hs b/examples/tagblog/hakyll.hs
index c51007f..c2f16cf 100644
--- a/examples/tagblog/hakyll.hs
+++ b/examples/tagblog/hakyll.hs
@@ -26,11 +26,11 @@ main = hakyll $ do
renderPostList "posts.html" "All posts" renderablePosts
-- Render post list per tag
- mapM_ (\(tag, posts) -> renderPostList (tagToURL tag) ("Posts tagged " ++ tag) posts)
+ mapM_ (\(tag, posts) -> renderPostList (tagToUrl tag) ("Posts tagged " ++ tag) posts)
(toList tagMap)
-- Render index, including recent posts.
- let tagCloud = renderTagCloud tagMap tagToURL 100 200
+ let tagCloud = renderTagCloud tagMap tagToUrl 100 200
index = createListingWith postManipulation "index.html"
"templates/postitem.html"
(take 3 renderablePosts)
@@ -51,9 +51,9 @@ main = hakyll $ do
where postManipulation :: ContextManipulation
postManipulation = renderDate "date" "%B %e, %Y" "Date unknown"
- . renderTagLinks tagToURL
+ . renderTagLinks tagToUrl
- tagToURL tag = "$root/tags/" ++ removeSpaces tag ++ ".html"
+ tagToUrl tag = "$root/tags/" ++ removeSpaces tag ++ ".html"
renderPostList url title posts = do
let list = createListingWith postManipulation url "templates/postitem.html" posts [("title", title)]