Skip to content

Commit

Permalink
fix: missing code after merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rpearce committed Feb 18, 2023
1 parent fdbe4b5 commit 44bedd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ssg/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}

import Control.Monad (forM_)
import Data.List (isPrefixOf, isSuffixOf)
import Data.Maybe (fromMaybe)
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Data.Text.Slugger as Slugger
import Hakyll
import System.FilePath (takeFileName)
import qualified Text.HTML.TagSoup as TS
import Text.Pandoc
( Extension (Ext_fenced_code_attributes, Ext_footnotes, Ext_gfm_auto_identifiers, Ext_implicit_header_references, Ext_smart),
Extensions,
Expand Down Expand Up @@ -100,6 +103,7 @@ main = hakyllWith config $ do
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/post.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= compressHtmlCompiler

match "new-zealand/**" $ do
let ctx = constField "type" "article" <> postCtx
Expand All @@ -109,6 +113,7 @@ main = hakyllWith config $ do
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/info.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= compressHtmlCompiler

match "index.html" $ do
route idRoute
Expand All @@ -124,6 +129,7 @@ main = hakyllWith config $ do
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= compressHtmlCompiler

match "templates/*" $ compile templateBodyCompiler

Expand Down
2 changes: 2 additions & 0 deletions ssg/ssg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ executable hakyll-site
hs-source-dirs: src
build-depends: base >= 4.8
, hakyll >= 4.14
, containers >= 0.6.5.1
, filepath >= 1.0
, pandoc >= 2.11
, slugger >= 0.1.0.1
, tagsoup >= 0.14.8
, text >= 1 && < 1.3
ghc-options: -Wall -threaded
default-language: Haskell2010

0 comments on commit 44bedd0

Please sign in to comment.