Skip to content

Commit

Permalink
feat: rip out forester (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLorimer authored Sep 2, 2024
1 parent 52794f2 commit 3cd089c
Show file tree
Hide file tree
Showing 96 changed files with 169 additions and 2,453 deletions.
13 changes: 4 additions & 9 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ data Experience = Experience
, startDate :: String
, endDate :: Maybe String
, technologies :: [Technology]
, hasTechnologies :: Bool
, content :: String
}
deriving (Generic, Eq, Show, FromJSON, Binary)
Expand Down Expand Up @@ -184,23 +185,23 @@ mdToHTML = markdownToHTMLWithOpts markdownOptions defaultHtml5Options
Builders
------------------------------------------------}
buildExperience :: FilePath -> Action Experience
buildExperience srcPath = cacheAction ("build" :: T.Text, srcPath) $ do
buildExperience srcPath = cacheAction ("build experience" :: T.Text, srcPath) $ do
liftIO . putStrLn $ "Rebuilding aboutme/experience: " <> srcPath
experienceContent <- readFile' srcPath
-- load post content and metadata as JSON blob
experienceData <- mdToHTML . T.pack $ experienceContent
convert experienceData

buildBio :: FilePath -> Action Bio
buildBio srcPath = cacheAction ("build" :: T.Text, srcPath) $ do
buildBio srcPath = cacheAction ("build bio" :: T.Text, srcPath) $ do
liftIO . putStrLn $ "Rebuilding aboutme/bio: " <> srcPath
bioContent <- readFile' srcPath
-- load post content and metadata as JSON blob
bioData <- mdToHTML . T.pack $ bioContent
convert bioData

buildEducation :: FilePath -> Action Education
buildEducation srcPath = cacheAction ("build" :: T.Text, srcPath) $ do
buildEducation srcPath = cacheAction ("build education" :: T.Text, srcPath) $ do
liftIO . putStrLn $ "Rebuilding aboutme/education: " <> srcPath
eduContent <- readFile' srcPath
-- load post content and metadata as JSON blob
Expand Down Expand Up @@ -347,11 +348,6 @@ buildGithubIdentityClaim = do
outputFolder <- ask
lift $ copyFileChanged "site/github.html" $ outputFolder <> "github.html"

buildForestXSLT :: SiteM ()
buildForestXSLT = do
outputFolder <- ask
lift $ copyFileChanged "site/forest.xsl" $ outputFolder <> "forest.xsl"

{------------------------------------------------
Shake Build
------------------------------------------------}
Expand All @@ -365,7 +361,6 @@ buildRules = do
buildFeed allPosts
buildCNAME
buildGithubIdentityClaim
buildForestXSLT
copyStaticFiles

main :: IO ()
Expand Down
216 changes: 1 addition & 215 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3cd089c

Please sign in to comment.