fixed flattr backlinks
This commit is contained in:
parent
3107b23376
commit
b226fde9d4
2 changed files with 4 additions and 1 deletions
|
@ -27,3 +27,5 @@ executable blog
|
||||||
, hakyll
|
, hakyll
|
||||||
, directory
|
, directory
|
||||||
, HTTP
|
, HTTP
|
||||||
|
, unix
|
||||||
|
, filepath
|
||||||
|
|
|
@ -5,6 +5,7 @@ import Data.Monoid ((<>))
|
||||||
import Data.List (sort, delete)
|
import Data.List (sort, delete)
|
||||||
import System.Directory
|
import System.Directory
|
||||||
import Network.HTTP.Base (urlEncode)
|
import Network.HTTP.Base (urlEncode)
|
||||||
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -67,7 +68,7 @@ main = do
|
||||||
compile $ do
|
compile $ do
|
||||||
ident <- getUnderlying
|
ident <- getUnderlying
|
||||||
title <- getMetadataField' ident "title"
|
title <- getMetadataField' ident "title"
|
||||||
let url = toFilePath ident
|
url <- return . fromMaybe "" =<< getRoute ident
|
||||||
compiled <- getResourceBody >>= renderPandoc
|
compiled <- getResourceBody >>= renderPandoc
|
||||||
let pageCtx = paginateContext pages num
|
let pageCtx = paginateContext pages num
|
||||||
let flattrCtx = constField "enctitle" (urlEncode title) <>
|
let flattrCtx = constField "enctitle" (urlEncode title) <>
|
||||||
|
|
Loading…
Reference in a new issue