Avoid rendering Markdown when pushing entry content into the og:description, and also, add the standard meta description and meta author
This commit is contained in:
parent
3b00565bda
commit
a0004946d6
1 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,7 @@ import Yesod.AtomFeed ( atomLink )
|
||||||
|
|
||||||
import Model.Cache ( getCached )
|
import Model.Cache ( getCached )
|
||||||
import Model.Entry ( entryTitle )
|
import Model.Entry ( entryTitle )
|
||||||
|
import Model.Markdown ( unMarkdown )
|
||||||
import Widget.Entry ( entryR, hEntry )
|
import Widget.Entry ( entryR, hEntry )
|
||||||
import Widget.Feed ( hFeed )
|
import Widget.Feed ( hFeed )
|
||||||
|
|
||||||
|
@ -40,9 +41,12 @@ renderEntry entry = do
|
||||||
defaultLayout $ do
|
defaultLayout $ do
|
||||||
setTitle . toHtml . entryTitle . entityVal $ entry
|
setTitle . toHtml . entryTitle . entityVal $ entry
|
||||||
toWidgetHead [hamlet|
|
toWidgetHead [hamlet|
|
||||||
|
<meta name="author" content=#{userFullName $ entityVal author}>
|
||||||
|
<link rel="author" href=@{userProfile $ entityVal author}>
|
||||||
|
<meta name="description" content=#{unMarkdown $ entryContent $ entityVal entry}>
|
||||||
<meta property="og:title" content=#{entryTitle $ entityVal entry}>
|
<meta property="og:title" content=#{entryTitle $ entityVal entry}>
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
<meta property="og:description" content=#{entryContent $ entityVal entry}>
|
<meta property="og:description" content=#{unMarkdown $ entryContent $ entityVal entry}>
|
||||||
<meta property="article:author" content=@{userProfile $ entityVal author}>
|
<meta property="article:author" content=@{userProfile $ entityVal author}>
|
||||||
<meta property="article:section" content=#{K.pluralise $ entryKind $ entityVal entry}>
|
<meta property="article:section" content=#{K.pluralise $ entryKind $ entityVal entry}>
|
||||||
|]
|
|]
|
||||||
|
|
Loading…
Reference in a new issue