remove tags

This commit is contained in:
nek0 2016-05-10 00:50:26 +02:00
parent 55dade0889
commit af4afb0a53
2 changed files with 5 additions and 9 deletions

View File

@ -66,14 +66,11 @@ main = do
route $ setExtension "html"
compile $ do
ident <- getUnderlying
tagList <- getTags ident
let tagString = intercalate "," tagList
meta <- getMetadata ident
title <- getMetadataField' ident "title"
let url = toFilePath ident
compiled <- getResourceBody >>= renderPandoc
let pageCtx = paginateContext pages num
let ctx = (postCtx tags) <> pageCtx <> flattrCtx tagString (urlEncode title) (urlEncode $ "htps://nek0.eu/" ++ url)
let ctx = (postCtx tags) <> pageCtx <> flattrCtx (urlEncode title) (urlEncode $ "htps://nek0.eu/" ++ url)
full <- loadAndApplyTemplate "templates/post.html" ctx compiled
_ <- saveSnapshot "content" compiled
loadAndApplyTemplate "templates/default.html" baseCtx full
@ -145,10 +142,9 @@ feedCtx = mconcat
--------------------------------------------------------------------------------
flattrCtx :: String -> String -> String -> Context String
flattrCtx tag tit url = mconcat
[ constField "rawtags" tag
, constField "enctitle" tit
flattrCtx :: String -> String -> Context String
flattrCtx tit url = mconcat
[ constField "enctitle" tit
, constField "encurl" url
]

View File

@ -10,7 +10,7 @@
$body$
<a class="flattr" target="_blank" href="https://flattr.com/submit/auto?user_id=nek0&url=$encurl$&title=$enctitle$&tags=$rawtags$" alt="flattr this!">flattr this!</a>
<a class="flattr" target="_blank" href="https://flattr.com/submit/auto?user_id=nek0&url=$encurl$&title=$enctitle$" alt="flattr this!">flattr this!</a>
<div class="pagination">
$if(previousPageNum)$