Simplify site title handling, automatically suffix site title to all pages
This commit is contained in:
parent
4088735c69
commit
1b8a07a5f6
8 changed files with 17 additions and 13 deletions
|
|
@ -15,14 +15,10 @@ import Widget.Feed ( hFeed )
|
|||
getHomeR :: Handler Html
|
||||
getHomeR = do
|
||||
userE@(Entity userId user) <- runDB . getBy404 $ UniqueUser "dani"
|
||||
maybeTitle <- asks $ appTitle . appSettings
|
||||
title <- asks $ siteTitle . appSettings
|
||||
entries <- runDB $ selectList [EntryAuthorId ==. userId] [Desc EntryPublished]
|
||||
defaultLayout $ do
|
||||
case maybeTitle of
|
||||
Just title -> do
|
||||
setTitle $ toHtml title
|
||||
atomLink FeedR title
|
||||
Nothing -> return ()
|
||||
atomLink FeedR title
|
||||
toWidgetHead
|
||||
[hamlet|
|
||||
<meta name="author" content=#{userFullName user}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue