feat: add rss link alternate tag to head
This commit is contained in:
parent
9a4b698d68
commit
372422ab18
2 changed files with 7 additions and 1 deletions
|
@ -39,6 +39,10 @@
|
|||
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="canonical" href="$root$$url$">
|
||||
|
||||
<link rel="alternate" href="./atom.xml" title="$feedTitle$" type="application/atom+xml">
|
||||
<link rel="alternate" href="./rss.xml" title="$feedTitle$" type="application/rss+xml">
|
||||
|
||||
<link rel="stylesheet" href="./css/default.css" />
|
||||
<link rel="stylesheet" href="./css/code.css" />
|
||||
</head>
|
||||
|
|
|
@ -29,7 +29,7 @@ mySiteRoot :: String
|
|||
mySiteRoot = "https://my-site.com"
|
||||
|
||||
myFeedTitle :: String
|
||||
myFeedTitle = "My Site"
|
||||
myFeedTitle = "My Feed Title"
|
||||
|
||||
myFeedDescription :: String
|
||||
myFeedDescription = "My Site Description"
|
||||
|
@ -108,6 +108,7 @@ main = hakyllWith config $ do
|
|||
let indexCtx =
|
||||
listField "posts" postCtx (return posts)
|
||||
<> constField "root" mySiteRoot
|
||||
<> constField "feedTitle" myFeedTitle
|
||||
<> constField "siteName" mySiteName
|
||||
<> defaultContext
|
||||
|
||||
|
@ -163,6 +164,7 @@ feedCtx =
|
|||
postCtx :: Context String
|
||||
postCtx =
|
||||
constField "root" mySiteRoot
|
||||
<> constField "feedTitle" myFeedTitle
|
||||
<> constField "siteName" mySiteName
|
||||
<> dateField "date" "%Y-%m-%d"
|
||||
<> defaultContext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue