summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Page.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Hakyll/Page.hs')
-rw-r--r--src/Text/Hakyll/Page.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs
index 347e10a..f2b5fde 100644
--- a/src/Text/Hakyll/Page.hs
+++ b/src/Text/Hakyll/Page.hs
@@ -88,8 +88,11 @@ readPage path = do
let sections = evalState (splitAtDelimiters $ lines contents) Nothing
sectionsData = concat $ zipWith ($) sectionFunctions sections
+ -- Note that url, path etc. are listed first, which means can be overwritten
+ -- by section data
return $ PageSection ("url", url, False)
: PageSection ("path", path, False)
+ : PageSection ("title", takeBaseName path, False)
: (category ++ sectionsData)
where
category = let dirs = splitDirectories $ takeDirectory path