chore(blog): Minor changes to integrate DNS based backend
This commit is contained in:
parent
c5ef3e01b2
commit
bd47122afb
5 changed files with 18 additions and 21 deletions
|
|
@ -5,7 +5,7 @@ import qualified Data.Text as T
|
|||
|
||||
import Control.Monad (liftM)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Time (UTCTime, getCurrentTime)
|
||||
import Data.Time (UTCTime(..), getCurrentTime, secondsToDiffTime)
|
||||
import Network.URI
|
||||
import Text.RSS
|
||||
|
||||
|
|
@ -13,11 +13,11 @@ import BlogStore
|
|||
import Locales
|
||||
|
||||
createChannel :: BlogLang -> UTCTime -> [ChannelElem]
|
||||
createChannel l now = [ Language $ show l
|
||||
, Copyright "Vincent Ambo"
|
||||
, WebMaster "tazjin@gmail.com"
|
||||
, ChannelPubDate now
|
||||
]
|
||||
createChannel l now = [ Language $ show l
|
||||
, Copyright "Vincent Ambo"
|
||||
, WebMaster "tazjin@gmail.com"
|
||||
, ChannelPubDate now
|
||||
]
|
||||
|
||||
createRSS :: BlogLang -> UTCTime -> [Item] -> RSS
|
||||
createRSS l t = RSS (rssTitle l) (rssLink l) (rssDesc l) (createChannel l t)
|
||||
|
|
@ -26,7 +26,7 @@ createItem :: Entry -> Item
|
|||
createItem Entry{..} = [ Title $ T.unpack title
|
||||
, Link $ makeLink lang entryId
|
||||
, Description $ T.unpack btext
|
||||
, PubDate edate]
|
||||
, PubDate $ UTCTime edate $ secondsToDiffTime 0 ]
|
||||
|
||||
makeLink :: BlogLang -> EntryId -> URI
|
||||
makeLink l i = let url = "http://tazj.in/" ++ show l ++ "/" ++ show i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue