Merge pull request #44 from rpearce/feat/rss-and-minor-changes
feat: rss link alternate and minor changes
This commit is contained in:
commit
cae75cb327
4 changed files with 11 additions and 8 deletions
|
@ -1,3 +1,3 @@
|
|||
;(function(w, d) {
|
||||
console.log('Hello, world!', w, d)
|
||||
})(window, document);
|
||||
;(function() {
|
||||
console.log('Hello, world!');
|
||||
})();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
<a href=".$url$">$title$</a>
|
||||
</h1>
|
||||
<div>
|
||||
<small>$date$</small>
|
||||
$if(updated)$
|
||||
<small>(updated: $updated$)</small>
|
||||
$endif$
|
||||
$date$ $if(updated)$(updated: $updated$)$endif$
|
||||
</div>
|
||||
</header>
|
||||
<section>
|
||||
|
|
|
@ -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
Reference in a new issue