Skip to content

Commit 4b3766c

Browse files
committed
Add custom 404 page. Close #135
1 parent 2cf3685 commit 4b3766c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

site.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ main = hakyll $ do
208208
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
209209
>>= relativizeUrls
210210

211+
-- 404 -------------------------------------------------------------------------------------------------
212+
match "404.html" $ do
213+
route idRoute
214+
compile $ do
215+
sponsors <- buildSponsorsCtx
216+
getResourceBody
217+
>>= applyAsTemplate sponsors
218+
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
219+
>>= relativizeUrls
220+
211221
-- templates -------------------------------------------------------------------------------------------
212222
match "templates/*" $ compile templateBodyCompiler
213223
match "templates/**" $ compile templateBodyCompiler

0 commit comments

Comments
 (0)