rss description should be post body

This commit is contained in:
Robert Pearce 2020-11-10 10:34:58 -05:00
parent e425a657e6
commit 5ca255e9c8
No known key found for this signature in database
GPG Key ID: 07A0E482E5616C9B
5 changed files with 6 additions and 12 deletions

View File

@ -59,7 +59,6 @@ main = hakyllWith config $ do
match "css/*" $ do
route idRoute
compile compressCssCompiler
match "posts/*" $ do
let ctx = constField "type" "article" <> postCtx
route $ metadataRoute titleRoute
@ -68,7 +67,6 @@ main = hakyllWith config $ do
>>= loadAndApplyTemplate "templates/post.html" ctx
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/default.html" ctx
match "index.html" $ do
route idRoute
compile $ do
@ -81,10 +79,8 @@ main = hakyllWith config $ do
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
match "templates/*" $
compile templateBodyCompiler
create ["sitemap.xml"] $ do
route idRoute
compile $ do
@ -96,11 +92,9 @@ main = hakyllWith config $ do
<> listField "pages" postCtx (return pages)
makeItem ("" :: String)
>>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx
create ["rss.xml"] $ do
route idRoute
compile (feedCompiler renderRss)
create ["atom.xml"] $ do
route idRoute
compile (feedCompiler renderAtom)

View File

@ -1,5 +1,5 @@
---
description: "This is me saying hello to the world"
desc: "This is me saying hello to the world"
image: "./images/robert-pearce-UwHN0jU_YqQ-unsplash-800w.jpg"
lang: "en"
stylesheet: "default"

View File

@ -1,7 +1,7 @@
---
author: "My name"
authorTwitter: "@MyName"
description: "I announce myself to the world"
desc: "I announce myself to the world"
image: "./images/waiheke-stony-batter.jpg"
keywords: "hello, announcement"
lang: "en"

View File

@ -1,7 +1,7 @@
---
author: "Mi nombre"
authorTwitter: "@MiNombre"
description: "Me anuncio al mundo"
desc: "Me anuncio al mundo"
image: "./images/waiheke-stony-batter.jpg"
keywords: "hola, anuncio"
lang: "es"

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="$description$">
<meta name="description" content="$desc$">
$if(author)$
<meta name="author" content="$author$">
$endif$
@ -16,7 +16,7 @@
<meta property="og:site_name" content="$siteName$">
<meta property="og:title" content="$title$">
<meta property="og:url" content="$root$$url$">
<meta property="og:description" content="$description$">
<meta property="og:description" content="$desc$">
$if(image)$
<meta property="og:image" content="$root$$image$">
$endif$
@ -29,7 +29,7 @@
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="$siteName$">
<meta property="twitter:title" content="$title$">
<meta property="twitter:description" content="$description$">
<meta property="twitter:description" content="$desc$">
$if(image)$
<meta property="twitter:image" content="$root$$image$">
$endif$