on master help sign in
Updated some comments.
commit01d8c4b330ecbc8ca52bfbe659bdecad475bd1ab authorJasper Van der Jeugt <jaspervdj@gmail.com> dateThu 11 Mar 2010, 12:25 (17 years ago) parenta2c1593
3 files changed+11−13
src/Text/Hakyll/CreateContext.hs+5−7 src/Text/Hakyll/Paginate.hs+2−2 src/Text/Hakyll/Tags.hs+4−4
src/Text/Hakyll/CreateContext.hs+5−7
@@ -69,12 +69,11 @@ createListing url templates renderables additional =
6969 context = ("body", Right concatenation) : additional
7070 concatenation = renderAndConcat templates renderables
7171
72−-- | Combine two renderables. The url will always be taken from the first
72+-- | Combine two @Context@s. The url will always be taken from the first
7373-- @Renderable@. Also, if a `$key` is present in both renderables, the
74−-- value from the first @Renderable@ will be taken as well.
74+-- value from the first @Context@ will be taken as well.
7575--
76−-- Since renderables are always more or less key-value maps, you can see
77−-- this as a @union@ between two maps.
76+-- You can see this as a this as a @union@ between two mappings.
7877combine :: HakyllAction () Context -> HakyllAction () Context
7978 -> HakyllAction () Context
8079combine x y = HakyllAction
@@ -84,7 +83,7 @@ combine x y = HakyllAction
8483 liftM2 M.union (runHakyllAction x) (runHakyllAction y)
8584 }
8685
87−-- | Combine two renderables and set a custom URL. This behaves like @combine@,
86+-- | Combine two @Context@s and set a custom URL. This behaves like @combine@,
8887-- except that for the @url@ field, the given URL is always chosen.
8988combineWithUrl :: FilePath
9089 -> HakyllAction () Context
@@ -92,8 +91,7 @@ combineWithUrl :: FilePath
9291 -> HakyllAction () Context
9392combineWithUrl url x y = combine'
9493 { actionUrl = Just $ return url
95− , actionFunction = \_ ->
96− M.insert "url" url <$> runHakyllAction combine'
94+ , actionFunction = \_ -> M.insert "url" url <$> runHakyllAction combine'
9795 }
9896 where
9997 combine' = combine x y
src/Text/Hakyll/Paginate.hs+2−2
@@ -34,7 +34,7 @@ defaultPaginateConfiguration = PaginateConfiguration
3434 }
3535
3636-- | The most important function for pagination. This function operates on a
37−-- list of renderables (the pages), and basically just adds fields to them
37+-- list of @Context@s (the pages), and basically just adds fields to them
3838-- by combining them with a custom page.
3939--
4040-- The following metadata fields will be added:
@@ -65,7 +65,7 @@ paginate configuration renderables = paginate' Nothing renderables (1 :: Int)
6565 Nothing -> error "No link found for pagination."
6666
6767 -- The main function that creates combined renderables by recursing over
68− -- the list of renderables.
68+ -- the list of items.
6969 paginate' _ [] _ = []
7070 paginate' maybePrev (x:xs) index =
7171 let (previous, first) = case maybePrev of
src/Text/Hakyll/Tags.hs+4−4
@@ -92,7 +92,7 @@ readMap getTagsFunction identifier paths = HakyllAction
9292 return $ foldr addPaths' current tags
9393
9494-- | Read a @TagMap@, using the @tags@ metadata field.
95−readTagMap :: String -- ^ Unique identifier for the map.
95+readTagMap :: String -- ^ Unique identifier for the map.
9696 -> [FilePath] -- ^ Paths to get tags from.
9797 -> HakyllAction () TagMap
9898readTagMap = readMap getTagsFunction
@@ -101,7 +101,7 @@ readTagMap = readMap getTagsFunction
101101 . fromMaybe [] . M.lookup "tags"
102102
103103-- | Read a @TagMap@, using the subdirectories the pages are placed in.
104−readCategoryMap :: String -- ^ Unique identifier for the map.
104+readCategoryMap :: String -- ^ Unique identifier for the map.
105105 -> [FilePath] -- ^ Paths to get tags from.
106106 -> HakyllAction () TagMap
107107readCategoryMap = readMap $ maybeToList . M.lookup "category"
@@ -115,8 +115,8 @@ withTagMap tagMap function = runHakyllAction (tagMap >>> action)
115115
116116-- | Render a tag cloud.
117117renderTagCloud :: (String -> String) -- ^ Function to produce an url for a tag.
118− -> Float -- ^ Smallest font size, in percent.
119− -> Float -- ^ Biggest font size, in percent.
118+ -> Float -- ^ Smallest font size, in percent.
119+ -> Float -- ^ Biggest font size, in percent.
120120 -> HakyllAction TagMap String
121121renderTagCloud urlFunction minSize maxSize = createHakyllAction renderTagCloud'
122122 where