From af4afb0a53214534105db540fad7662e1487f8cf Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 10 May 2016 00:50:26 +0200 Subject: [PATCH] remove tags --- src/Main.hs | 12 ++++-------- templates/post.html | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 3b433e6..e16ce97 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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 ] diff --git a/templates/post.html b/templates/post.html index 10a7494..45e82f2 100644 --- a/templates/post.html +++ b/templates/post.html @@ -10,7 +10,7 @@ $body$ -flattr this! +flattr this!