updated and mostly feature equal
This commit is contained in:
parent
f12936254a
commit
6c3f4f3031
|
@ -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 ()
|
||||
|
|
|
@ -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)}}}
|
||||
|
|
Loading…
Reference in New Issue