diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-10 19:17:18 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-10 19:17:18 +0100 |
commit | 6bcad2701a49ae422144111276b2815eb35311a4 (patch) | |
tree | e3f3d0b7f2a1f39fbe5c7d836083ad52ac89a365 /src/Text/Hakyll/Tags.hs | |
parent | 6a2e6998b125024e9260d26819c262e0e7d22c8d (diff) | |
download | hakyll-6bcad2701a49ae422144111276b2815eb35311a4.tar.gz |
Added custom Template system. Highly experimental.
Diffstat (limited to 'src/Text/Hakyll/Tags.hs')
-rw-r--r-- | src/Text/Hakyll/Tags.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Hakyll/Tags.hs b/src/Text/Hakyll/Tags.hs index 69386be..801b9b1 100644 --- a/src/Text/Hakyll/Tags.hs +++ b/src/Text/Hakyll/Tags.hs @@ -7,7 +7,6 @@ module Text.Hakyll.Tags ) where import qualified Data.Map as M -import qualified Data.ByteString.Lazy.Char8 as B import Data.List (intercalate) import Control.Monad (foldM) @@ -24,7 +23,7 @@ readTagMap :: [FilePath] -> IO (M.Map String [FilePath]) readTagMap paths = foldM addPaths M.empty paths where addPaths current path = do page <- readPage path - let tags = map trim $ split "," $ B.unpack $ getValue ("tags") page + let tags = map trim $ splitRegex "," $ getValue ("tags") page return $ foldr (\t -> M.insertWith (++) t [path]) current tags -- | Render a tag cloud. @@ -57,6 +56,6 @@ renderTagCloud tagMap urlFunction minSize maxSize = renderTagLinks :: (String -> String) -- ^ Function that produces an url for a tag. -> ContextManipulation renderTagLinks urlFunction = renderValue "tags" "tags" renderTagLinks' - where renderTagLinks' = B.pack . intercalate ", " + where renderTagLinks' = intercalate ", " . map (\t -> link t $ urlFunction t) - . map trim . split "," . B.unpack + . map trim . splitRegex "," |