~jack/jackkelly-name

3761e35b9452c5dabe9d2e1049174eb28234f03e — Jack Kelly 22 days ago 2eb0d66
wiki: Fix updated_at fields
2 files changed, 5 insertions(+), 4 deletions(-)

M src/Wiki.hs
M src/Wiki/Slamjam.hs
M src/Wiki.hs => src/Wiki.hs +1 -1
@@ 58,7 58,7 @@ pagePath = do
pageContext :: Text -> Context String
pageContext path = mconcat
  [ constField "path" $ T.unpack path
  , modificationTimeField "updated_at" "%B %e, %Y"
  , dateField "updated_at" "%B %e, %Y"
  , navigationContext (select "Wiki" navigation)
  , baseSiteContext
  ]

M src/Wiki/Slamjam.hs => src/Wiki/Slamjam.hs +4 -3
@@ 7,6 7,7 @@ module Wiki.Slamjam where

import           Data.Aeson (FromJSON(..), (.:), eitherDecode, withObject)
import           Data.Binary (Binary)
import qualified Data.ByteString.Lazy.Char8 as BL8
import           Data.Text (Text)
import qualified Data.Text as T
import           GHC.Generics (Generic)


@@ 66,8 67,8 @@ slamjam = do
  match "wiki/slamjam.json" $ do
    route $ setExtension "html"
    compile $ do
      tierList <- getResourceLBS >>=
        either fail pure . eitherDecode @TierList . itemBody
      tierList <- getResourceBody >>=
        either fail pure . eitherDecode @TierList . BL8.pack . itemBody

      let
        slamItems :: [Slam] -> Compiler [Item Slam]


@@ 80,7 81,7 @@ slamjam = do
          , listField "tier-c" slamContext . slamItems $ tierC tierList
          , listField "tier-d" slamContext . slamItems $ tierD tierList
          , listField "tier-f" slamContext . slamItems $ tierF tierList
          , modificationTimeField "updated_at" "%B %e, %Y"
          , dateField "updated_at" "%B %e, %Y"
          , constField "title" $ sectionLabel ["Wiki", "Slam Jam Tier List"]
          , constField "path" "/wiki/slamjam"
          , navigationContext (select "Wiki" navigation)