Properly link off to posts in Atom feed; include post content in feed
This commit is contained in:
@@ -5,6 +5,7 @@ import Data.ByteString.Lazy (ByteString)
|
||||
import qualified Data.ByteString as B
|
||||
import Data.Text
|
||||
import Data.Text.Encoding (decodeUtf8)
|
||||
import Data.Text.Lazy (toStrict)
|
||||
import qualified Lucid as LU
|
||||
import System.IO ()
|
||||
|
||||
@@ -18,3 +19,8 @@ mdToLucid cmtextinput = case (commonmark "" cmtextinput) of
|
||||
|
||||
mdFileToLucid :: FilePath -> IO (LU.Html ())
|
||||
mdFileToLucid path = fmap (mdToLucid . decodeUtf8) (B.readFile path)
|
||||
|
||||
mdFileToText :: FilePath -> IO (Text)
|
||||
mdFileToText path = do
|
||||
htmlContent <- mdFileToLucid path
|
||||
return $ toStrict $ LU.renderText htmlContent
|
||||
|
||||
Reference in New Issue
Block a user