Actually set the 'author' meta correctly in the page head
This commit is contained in:
parent
edd82eff55
commit
e141fb4666
2 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
module Handler.Home where
|
||||
|
||||
|
@ -11,9 +11,15 @@ import Widget.Hcard (hcard)
|
|||
getHomeR :: Handler Html
|
||||
getHomeR = do
|
||||
user <- runDB . getBy404 $ UniqueUsername "dani"
|
||||
let name = userFullName . entityVal $ user
|
||||
maybeTitle <- asks $ appTitle . appSettings
|
||||
defaultLayout $ do
|
||||
case maybeTitle of
|
||||
Just title -> setTitle $ toHtml title
|
||||
Nothing -> return ()
|
||||
toWidgetHead
|
||||
[hamlet|
|
||||
<meta name="author" content=#{name}>
|
||||
<link rel="author" href=@{HomeR}>
|
||||
|]
|
||||
$(widgetFile "home")
|
||||
|
|
|
@ -3,11 +3,9 @@ $doctype 5
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="#{packageName package} #{packageVersion package}">
|
||||
|
||||
<title>#{pageTitle pc}
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta name="generator" content="#{packageName package} #{packageVersion package}">
|
||||
$maybe route <- mcurrentRoute
|
||||
<link rel="canonical" href=@{route}>
|
||||
|
||||
|
|
Loading…
Reference in a new issue