updated and mostly feature equal

This commit is contained in:
Yann Esposito (Yogsototh) 2020-06-25 16:28:35 +02:00
parent f12936254a
commit 6c3f4f3031
Signed by untrusted user who does not match committer: yogsototh
GPG Key ID: 7B19A4C650D59646
2 changed files with 3 additions and 3 deletions

View File

@ -80,14 +80,13 @@ getBlogpostFromMetas
getBlogpostFromMetas path toc pandoc@(Pandoc meta _) = do
eitherBlogpost <- liftIO $ Pandoc.runIO $ do
title <- fmap (T.dropEnd 1) $ inlineToText $ docTitle meta
date <- fmap (T.dropAround dateEnvelope) $ inlineToText $ docDate meta
date <- fmap (T.takeWhile (/= ' ') . (T.dropAround dateEnvelope)) $ inlineToText $ docDate meta
author <- case head $ docAuthors meta of
Just m -> inlineToText m
Nothing -> return ""
let tags = tagsToList $ lookupMeta "keywords" meta
description = descr $ lookupMeta "description" meta
url = "/" </> dropDirectory1 path -<.> "org"
liftIO $ print (lookupMeta "keywords" meta)
return $ BlogPost title date author url path tags description toc pandoc
case eitherBlogpost of
Left _ -> fail "BAD"
@ -246,7 +245,7 @@ genHtml bp = do
origin :: Text
origin = "https://her.esy.fun"
genHtmlAction
:: (FilePath -> Action BlogPost)
-> (FilePath -> Action Template) -> [Char] -> Action ()

View File

@ -58,6 +58,7 @@ Here is the CSS you could use:
{{{colorbox(b1,black,#a7abb5)}}}
{{{colorbox(b2,black,#e5e8f0)}}}
{{{colorbox(b3,black,#f3f6fe)}}}
@@html:<br/>@@
{{{colorbox(y,white,#ad8c51)}}}
{{{colorbox(o,white,#a9664b)}}}
{{{colorbox(r,white,#af6256)}}}