summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Hakyll/Core/Identifier.hs7
-rw-r--r--lib/Hakyll/Web/Feed.hs13
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/Hakyll/Core/Identifier.hs b/lib/Hakyll/Core/Identifier.hs
index 6054771..d6306a8 100644
--- a/lib/Hakyll/Core/Identifier.hs
+++ b/lib/Hakyll/Core/Identifier.hs
@@ -21,7 +21,8 @@ module Hakyll.Core.Identifier
--------------------------------------------------------------------------------
import Control.DeepSeq (NFData (..))
import Data.List (intercalate)
-import System.FilePath (dropTrailingPathSeparator, splitPath)
+import System.FilePath (dropTrailingPathSeparator, splitPath,
+ pathSeparator)
--------------------------------------------------------------------------------
@@ -72,7 +73,9 @@ fromFilePath = Identifier Nothing .
--------------------------------------------------------------------------------
-- | Convert an identifier to a relative 'FilePath'
toFilePath :: Identifier -> FilePath
-toFilePath = identifierPath
+toFilePath = intercalate [pathSeparator] . split' . identifierPath
+ where
+ split' = map dropTrailingPathSeparator . splitPath
--------------------------------------------------------------------------------
diff --git a/lib/Hakyll/Web/Feed.hs b/lib/Hakyll/Web/Feed.hs
index 468453b..60a662c 100644
--- a/lib/Hakyll/Web/Feed.hs
+++ b/lib/Hakyll/Web/Feed.hs
@@ -39,24 +39,29 @@ import Hakyll.Web.Template.List
--------------------------------------------------------------------------------
import Data.FileEmbed (makeRelativeToProject)
+import System.FilePath ((</>))
--------------------------------------------------------------------------------
rssTemplate :: Template
rssTemplate =
- $(makeRelativeToProject "data/templates/rss.xml" >>= embedTemplate)
+ $(makeRelativeToProject ("data" </> "templates" </> "rss.xml")
+ >>= embedTemplate)
rssItemTemplate :: Template
rssItemTemplate =
- $(makeRelativeToProject "data/templates/rss-item.xml" >>= embedTemplate)
+ $(makeRelativeToProject ("data" </> "templates" </> "rss-item.xml")
+ >>= embedTemplate)
atomTemplate :: Template
atomTemplate =
- $(makeRelativeToProject "data/templates/atom.xml" >>= embedTemplate)
+ $(makeRelativeToProject ("data" </> "templates" </> "atom.xml")
+ >>= embedTemplate)
atomItemTemplate :: Template
atomItemTemplate =
- $(makeRelativeToProject "data/templates/atom-item.xml" >>= embedTemplate)
+ $(makeRelativeToProject ("data" </> "templates" </> "atom-item.xml")
+ >>= embedTemplate)
--------------------------------------------------------------------------------