File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ main = hakyll $ do
175
175
route idRoute
176
176
compile $ do
177
177
sponsors <- buildBoilerplateCtx (Just " Haskell Interlude" )
178
- ctx <- podcastCtx <$> loadAll (" podcast/*/index.markdown" .&&. hasVersion " raw" )
178
+ ctx <- podcastCtx . sortOn podcastOrd <$> loadAll (" podcast/*/index.markdown" .&&. hasVersion " raw" )
179
179
180
180
makeItem " "
181
181
>>= loadAndApplyTemplate " templates/podcast/list.html" ctx
@@ -212,7 +212,7 @@ main = hakyll $ do
212
212
route idRoute
213
213
compile $ do
214
214
sponsors <- buildBoilerplateCtx (Just " Haskell Foundation" )
215
- podcastsCtx <- podcastCtx . take 1 . reverse <$> loadAll (" podcast/*/index.markdown" .&&. hasVersion " raw" )
215
+ podcastsCtx <- podcastCtx . take 1 . reverse . sortOn podcastOrd <$> loadAll (" podcast/*/index.markdown" .&&. hasVersion " raw" )
216
216
careersCtx <- careersCtx . reverse <$> loadAll " careers/*.markdown"
217
217
218
218
makeItem " "
@@ -386,6 +386,9 @@ podcastCtx episodes =
386
386
listField " episodes" defaultContext (return $ reverse episodes) <>
387
387
defaultContext
388
388
389
+ podcastOrd :: Item String -> Integer
390
+ podcastOrd = read . head . fromJust . capture " podcast/*/index.markdown" . itemIdentifier
391
+
389
392
-- careers ---------------------------------------------------------------------------------------------
390
393
careersCtx :: [Item String ] -> Context String
391
394
careersCtx reqs =
You can’t perform that action at this time.
0 commit comments