Skip to content

Commit

Permalink
Only render published posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ysndr committed Apr 24, 2020
1 parent b882615 commit fa0d118
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion generator/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ main = do


-- assemble posts
match postsGlob $ do
matchMetadata postsGlob (\m -> lookupString "status" m == Just "published") $ do
let postCtx' = postCtx tags categories
route $ setExtension "html"
compile
Expand Down
1 change: 1 addition & 0 deletions src/posts/2019-12-24-Welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subtitle: Welcome to this Blog
tags:
description: Introduction and what this is about
image: https://unsplash.com/photos/6HdfrD20rTk/download?w=1600
status: published
image-credits: |
Image taken by <a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Roboto, Noto, &quot;Segoe UI&quot;, Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@ericmuhr?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Eric Muhr"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">Eric Muhr</span></a> on Unsplash
Expand Down
1 change: 1 addition & 0 deletions src/posts/internals/2019-12-31-built-with-hakyll-part-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subtitle: Introduction to Hakyll
tags: internal, technical, haskell
description: This site is build with Hakyll, here I explain how.
image: https://images.unsplash.com/photo-1576020363294-ab5dca00b6f8?w=1000
status: published
image-credits: |
Picture taken by <a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Roboto, Noto, &quot;Segoe UI&quot;, Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@mrsimonfischer?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Szymon Fischer"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">Szymon Fischer</span></a> on Unsplash
...
Expand Down
1 change: 1 addition & 0 deletions src/posts/internals/2020-03-22-built-with-hakyll-part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subtitle: Useful Hakyll Contexts
tags: internal, technical, haskell
description: Custom fields are a nice way to create dynamic content, in this article I want to show the collection of fields used on this blog.
image: https://unsplash.com/photos/IClZBVw5W5A/download?w=1000
status: published
image-credits: |
<a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Roboto, Noto, &quot;Segoe UI&quot;, Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@toddquackenbush?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Todd Quackenbush"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">Todd Quackenbush</span></a> on Unsplash
...
Expand Down
1 change: 1 addition & 0 deletions src/posts/internals/2020-04-10-built-with-nix/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subtitle: How I use Nix to manage development and CI of this blog
tags: internal, technical, nix, haskell
description: Nix is a purely functional package manger that allows isolated development environments and builds. This blog uses it to build development environment and to build the blog in a Github Action
image: https://images.unsplash.com/photo-1565058290014-df9bd491a29c
status: published
image-credits: |
Photo by <a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, &quot;San Francisco&quot;, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Roboto, Noto, &quot;Segoe UI&quot;, Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@the_roaming_platypus?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from timJ"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">timJ</span></a> on Unsplash
...
Expand Down

0 comments on commit fa0d118

Please sign in to comment.