Commit bbe543ed authored by Ben Gamari's avatar Ben Gamari 🐢

blog: Make it build

parent 3e717655
Pipeline #3378 passed with stages
in 26 minutes and 44 seconds
...@@ -128,3 +128,27 @@ TD.cellhead { ...@@ -128,3 +128,27 @@ TD.cellhead {
border-bottom-style: solid; border-bottom-style: solid;
} }
/* Blog post list */
.tags {
list-style: none;
display: inline;
padding: 0;
}
.tags li {
display: inline;
color: #333;
background-color: #eee;
margin: 0.1em;
border-radius: 1em;
padding: 0.2em 0.3em;
}
article {
padding: 1em
}
article a.title {
font-size:x-large;
}
...@@ -49,8 +49,19 @@ rules = do ...@@ -49,8 +49,19 @@ rules = do
>>= loadAndApplyTemplate "templates/default.html" ctx >>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls >>= relativizeUrls
match "*.mkd" markdownRules match "*.mkd" $ do
match "blog/*.mkd" markdownRules route $ setExtension "html"
compile $ pandocCompilerWithTransform defaultHakyllReaderOptions defaultHakyllWriterOptions pandocTransforms
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
match "blog/*.mkd" $ do
route $ setExtension "html"
compile $ pandocCompilerWithTransform defaultHakyllReaderOptions defaultHakyllWriterOptions pandocTransforms
>>= loadAndApplyTemplate "templates/blog-post.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
create ["blog.html"] $ do create ["blog.html"] $ do
route idRoute route idRoute
compile $ loadAll "blog/*.mkd" compile $ loadAll "blog/*.mkd"
...@@ -65,12 +76,6 @@ rules = do ...@@ -65,12 +76,6 @@ rules = do
where where
ctx = snippetField <> defaultContext ctx = snippetField <> defaultContext
markdownRules = do
route $ setExtension "html"
compile $ pandocCompilerWithTransform defaultHakyllReaderOptions defaultHakyllWriterOptions pandocTransforms
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
postList :: [Item String] -> Compiler (Item String) postList :: [Item String] -> Compiler (Item String)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
<a href="license.html">License</a></td> <a href="/license.html">License</a></td>
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
<a href="blog.html">Blog</a></td> <a href="/blog.html">Blog</a></td>
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
<a href="download.html">Download</a></td> <a href="/download.html">Download</a></td>
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
......
<div id="posts"> <div id="posts">
<h1>Developer Blog</h1> <h1>GHC Developer Blog</h1>
<div> <div>
$body$ $body$
</div> </div>
......
<h1>Blog: $title$</h1>
$body$
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment