pageUrl added

This commit is contained in:
Pagwin 2025-02-23 18:05:41 -05:00
parent 52d88c95a7
commit 4d45ab4bd5
No known key found for this signature in database
GPG key ID: 81137023740CA260
2 changed files with 4 additions and 6 deletions

View file

@ -11,7 +11,6 @@ import Config
import Control.Monad (forM, when)
import qualified Data.HashMap.Strict as HM
import Data.List (sortOn)
import Data.Maybe (fromJust)
import qualified Data.Ord as Ord
import qualified Data.Text as T
import Deriving.Aeson
@ -20,7 +19,6 @@ import Development.Shake (Action, Rules, (%>), (|%>), (~>))
import qualified Development.Shake as Shake
import Development.Shake.FilePath ((</>))
import qualified Development.Shake.FilePath as FP
import qualified Development.Shake.FilePath as Shake
import Templates
import Types
import Utilities
@ -104,7 +102,7 @@ markdownPost src = do
{ pageTitle = rPostTitle rPost,
pageContent = postHtml,
pageNow = time,
pageSection = T.pack $ fromJust $ Shake.stripExtension "html" target
pageUrl = T.pack ""
}
applyTemplateAndWrite "default.html" page target
@ -125,7 +123,7 @@ home =
{ pageTitle = T.pack "Home",
pageContent = html,
pageNow = time,
pageSection = T.pack $ fromJust $ Shake.stripExtension "html" target
pageUrl = T.pack ""
}
applyTemplateAndWrite "default.html" page target

View file

@ -10,8 +10,8 @@ data Page = Page
pageContent :: Text,
-- build time
pageNow :: Text,
-- css class for page section
pageSection :: Text
--
pageUrl :: Text
}
deriving (Show, Generic)
deriving (ToJSON) via PrefixedSnake "page" Page