diff --git a/hakyll.cabal b/hakyll.cabal
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
 Name:               hakyll
-Version:            2.4
+Version:            2.4.1
 
 Synopsis:           A simple static site generator library.
 Description:        A simple static site generator library, mainly aimed at
@@ -35,7 +35,7 @@
                     regex-base >= 0.93,
                     regex-tdfa >= 1.1,
                     network == 2.*,
-                    mtl == 1.*,
+                    mtl >= 1,
                     old-locale == 1.*,
                     old-time == 1.*,
                     time >= 1.1,
diff --git a/src/Text/Hakyll/ContextManipulations.hs b/src/Text/Hakyll/ContextManipulations.hs
--- a/src/Text/Hakyll/ContextManipulations.hs
+++ b/src/Text/Hakyll/ContextManipulations.hs
@@ -27,9 +27,10 @@
 
 -- | Do something with a value in a @Context@, but keep the old value as well.
 --   If the key given is not present in the @Context@, nothing will happen.
-renderValue :: String             -- ^ Key of which the value should be copied.
-            -> String             -- ^ Key the value should be copied to.
-            -> (String -> String) -- ^ Function to apply on the value.
+--
+renderValue :: String              -- ^ Key of which the value should be copied.
+            -> String              -- ^ Key the value should be copied to.
+            -> (String -> String)  -- ^ Function to apply on the value.
             -> HakyllAction Context Context
 renderValue source destination f = arr $ \(Context context) -> Context $
     case M.lookup source context of
diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs
--- a/src/Text/Hakyll/File.hs
+++ b/src/Text/Hakyll/File.hs
@@ -40,24 +40,32 @@
     path' = if "$root" `isPrefixOf` path then drop 5 path
                                          else path
 
--- | Convert a relative filepath to a filepath in the destination
+-- | Convert a relative URL to a filepath in the destination
 --   (default: @_site@).
 toDestination :: FilePath -> Hakyll FilePath
 toDestination url = do dir <- askHakyll siteDirectory
-                       enableIndexUrl' <- askHakyll enableIndexUrl
-                       let destination = if enableIndexUrl' && separatorEnd
-                               then dir </> noSeparator </> "index.html"
-                               else dir </> noSeparator
-                       return destination
-  where
-    noSeparator = removeLeadingSeparator url
-    separatorEnd = not (null url) && last url == '/'
+                       toFilePath dir url
 
--- | Convert a relative filepath to a filepath in the cache
+-- | Convert a relative URL to a filepath in the cache
 --   (default: @_cache@).
 toCache :: FilePath -> Hakyll FilePath
 toCache path = do dir <- askHakyll cacheDirectory
-                  return $ dir </> removeLeadingSeparator path
+                  toFilePath dir path
+
+-- | Implementation of toDestination/toCache
+--
+toFilePath :: String           -- ^ Directory (site or cache)
+           -> String           -- ^ URL
+           -> Hakyll FilePath  -- ^ Resulting file path
+toFilePath dir url = do
+   enableIndexUrl' <- askHakyll enableIndexUrl
+   let destination = if enableIndexUrl' && separatorEnd
+           then dir </> noSeparator </> "index.html"
+           else dir </> noSeparator
+   return destination
+  where
+    noSeparator = removeLeadingSeparator url
+    separatorEnd = not (null url) && last url == '/'
 
 -- | Get the url for a given page. For most extensions, this would be the path
 --   itself. It's only for rendered extensions (@.markdown@, @.rst@, @.lhs@ this
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs
--- a/src/Text/Hakyll/Page.hs
+++ b/src/Text/Hakyll/Page.hs
@@ -88,8 +88,11 @@
     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
