diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-13 12:36:45 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-13 12:36:45 +0100 |
commit | f2905021ec094ee794017586581c175ee98e7bb2 (patch) | |
tree | e4e0cee60f40b7389432f4c31093653bab1d30e9 /web/site.hs | |
parent | d129cdc775b728c700dcabe0fc9b600235b92284 (diff) | |
download | hakyll-f2905021ec094ee794017586581c175ee98e7bb2.tar.gz |
Add a clay tutorial
Diffstat (limited to 'web/site.hs')
-rw-r--r-- | web/site.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/site.hs b/web/site.hs index 2fca8e0..0f99af2 100644 --- a/web/site.hs +++ b/web/site.hs @@ -3,6 +3,7 @@ import Control.Applicative ((<$>)) import Control.Arrow (second) import Control.Monad (forM_) +import Data.Char (isDigit) import Data.List (isPrefixOf, partition) import Data.Monoid (mappend) import Hakyll @@ -111,4 +112,7 @@ hackage url -------------------------------------------------------------------------------- -- | Partition tutorials into tutorial series & other articles partitionTutorials :: [Item a] -> ([Item a], [Item a]) -partitionTutorials = partition $ matches (fromRegex "\\d*-.*") . itemIdentifier +partitionTutorials = partition $ \i -> + case splitPath (toFilePath $ itemIdentifier i) of + [_, (x : _)] -> isDigit x + _ -> False |