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) {
|
;(function() {
|
||||||
console.log('Hello, world!', w, d)
|
console.log('Hello, world!');
|
||||||
})(window, document);
|
})();
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico">
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
<link rel="canonical" href="$root$$url$">
|
<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/default.css" />
|
||||||
<link rel="stylesheet" href="./css/code.css" />
|
<link rel="stylesheet" href="./css/code.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
<a href=".$url$">$title$</a>
|
<a href=".$url$">$title$</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div>
|
<div>
|
||||||
<small>$date$</small>
|
$date$ $if(updated)$(updated: $updated$)$endif$
|
||||||
$if(updated)$
|
|
||||||
<small>(updated: $updated$)</small>
|
|
||||||
$endif$
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
|
|
@ -29,7 +29,7 @@ mySiteRoot :: String
|
||||||
mySiteRoot = "https://my-site.com"
|
mySiteRoot = "https://my-site.com"
|
||||||
|
|
||||||
myFeedTitle :: String
|
myFeedTitle :: String
|
||||||
myFeedTitle = "My Site"
|
myFeedTitle = "My Feed Title"
|
||||||
|
|
||||||
myFeedDescription :: String
|
myFeedDescription :: String
|
||||||
myFeedDescription = "My Site Description"
|
myFeedDescription = "My Site Description"
|
||||||
|
@ -108,6 +108,7 @@ main = hakyllWith config $ do
|
||||||
let indexCtx =
|
let indexCtx =
|
||||||
listField "posts" postCtx (return posts)
|
listField "posts" postCtx (return posts)
|
||||||
<> constField "root" mySiteRoot
|
<> constField "root" mySiteRoot
|
||||||
|
<> constField "feedTitle" myFeedTitle
|
||||||
<> constField "siteName" mySiteName
|
<> constField "siteName" mySiteName
|
||||||
<> defaultContext
|
<> defaultContext
|
||||||
|
|
||||||
|
@ -163,6 +164,7 @@ feedCtx =
|
||||||
postCtx :: Context String
|
postCtx :: Context String
|
||||||
postCtx =
|
postCtx =
|
||||||
constField "root" mySiteRoot
|
constField "root" mySiteRoot
|
||||||
|
<> constField "feedTitle" myFeedTitle
|
||||||
<> constField "siteName" mySiteName
|
<> constField "siteName" mySiteName
|
||||||
<> dateField "date" "%Y-%m-%d"
|
<> dateField "date" "%Y-%m-%d"
|
||||||
<> defaultContext
|
<> defaultContext
|
||||||
|
|
Loading…
Add table
Reference in a new issue