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
|
getBlogpostFromMetas path toc pandoc@(Pandoc meta _) = do
|
||||||
eitherBlogpost <- liftIO $ Pandoc.runIO $ do
|
eitherBlogpost <- liftIO $ Pandoc.runIO $ do
|
||||||
title <- fmap (T.dropEnd 1) $ inlineToText $ docTitle meta
|
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
|
author <- case head $ docAuthors meta of
|
||||||
Just m -> inlineToText m
|
Just m -> inlineToText m
|
||||||
Nothing -> return ""
|
Nothing -> return ""
|
||||||
let tags = tagsToList $ lookupMeta "keywords" meta
|
let tags = tagsToList $ lookupMeta "keywords" meta
|
||||||
description = descr $ lookupMeta "description" meta
|
description = descr $ lookupMeta "description" meta
|
||||||
url = "/" </> dropDirectory1 path -<.> "org"
|
url = "/" </> dropDirectory1 path -<.> "org"
|
||||||
liftIO $ print (lookupMeta "keywords" meta)
|
|
||||||
return $ BlogPost title date author url path tags description toc pandoc
|
return $ BlogPost title date author url path tags description toc pandoc
|
||||||
case eitherBlogpost of
|
case eitherBlogpost of
|
||||||
Left _ -> fail "BAD"
|
Left _ -> fail "BAD"
|
||||||
|
@ -246,7 +245,7 @@ genHtml bp = do
|
||||||
|
|
||||||
origin :: Text
|
origin :: Text
|
||||||
origin = "https://her.esy.fun"
|
origin = "https://her.esy.fun"
|
||||||
|
|
||||||
genHtmlAction
|
genHtmlAction
|
||||||
:: (FilePath -> Action BlogPost)
|
:: (FilePath -> Action BlogPost)
|
||||||
-> (FilePath -> Action Template) -> [Char] -> Action ()
|
-> (FilePath -> Action Template) -> [Char] -> Action ()
|
||||||
|
|
|
@ -58,6 +58,7 @@ Here is the CSS you could use:
|
||||||
{{{colorbox(b1,black,#a7abb5)}}}
|
{{{colorbox(b1,black,#a7abb5)}}}
|
||||||
{{{colorbox(b2,black,#e5e8f0)}}}
|
{{{colorbox(b2,black,#e5e8f0)}}}
|
||||||
{{{colorbox(b3,black,#f3f6fe)}}}
|
{{{colorbox(b3,black,#f3f6fe)}}}
|
||||||
|
@@html:<br/>@@
|
||||||
{{{colorbox(y,white,#ad8c51)}}}
|
{{{colorbox(y,white,#ad8c51)}}}
|
||||||
{{{colorbox(o,white,#a9664b)}}}
|
{{{colorbox(o,white,#a9664b)}}}
|
||||||
{{{colorbox(r,white,#af6256)}}}
|
{{{colorbox(r,white,#af6256)}}}
|
||||||
|
|
Loading…
Reference in a new issue