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" route $ setExtension "html"
compile $ do compile $ do
ident <- getUnderlying ident <- getUnderlying
tagList <- getTags ident
let tagString = intercalate "," tagList
meta <- getMetadata ident
title <- getMetadataField' ident "title" title <- getMetadataField' ident "title"
let url = toFilePath ident let url = toFilePath ident
compiled <- getResourceBody >>= renderPandoc compiled <- getResourceBody >>= renderPandoc
let pageCtx = paginateContext pages num 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 full <- loadAndApplyTemplate "templates/post.html" ctx compiled
_ <- saveSnapshot "content" compiled _ <- saveSnapshot "content" compiled
loadAndApplyTemplate "templates/default.html" baseCtx full loadAndApplyTemplate "templates/default.html" baseCtx full
@ -145,10 +142,9 @@ feedCtx = mconcat
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
flattrCtx :: String -> String -> String -> Context String flattrCtx :: String -> String -> Context String
flattrCtx tag tit url = mconcat flattrCtx tit url = mconcat
[ constField "rawtags" tag [ constField "enctitle" tit
, constField "enctitle" tit
, constField "encurl" url , constField "encurl" url
] ]

View file

@ -10,7 +10,7 @@
$body$ $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"> <div class="pagination">
$if(previousPageNum)$ $if(previousPageNum)$