Skip to content

Commit

Permalink
Remove tags from project pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Bull committed Nov 18, 2020
1 parent bc2ce95 commit 0e8bb9a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 25 deletions.
10 changes: 5 additions & 5 deletions projects.md
Expand Up @@ -8,21 +8,21 @@ layout: post

This project aims to help life scientists in managing their data - like a personal Google for your scientific data.
It is the place where I apply newly learned skills to a real-world project.
You can find out more on [GitHub](https://github.com/peri4n/beagle)
You can find out more on [GitHub](https://github.com/peri4n/beagle){target="_blank"}

# My Dev Environment

Notorious for being a productivity nerd, it comes naturally that I care a lot about my development setup.
I have customized my:

* Shell
* [Shell](https://github.com/peri4n/suckless-terminal){target="_blank"}
* Editor (NeoVim)
* Window Manager
* [Window Manager](https://github.com/peri4n/wm){target="_blank"}
* Email setup
* [Keyboard](https://github.com/peri4n/qmk_firmware)
* [Keyboard](https://github.com/peri4n/qmk_firmware){target="_blank"}

Additionally applying all the customizations is automated using Ansible scripts.
You can find out more on [GitHub](https://github.com/peri4n/setup)
You can find out more on [GitHub](https://github.com/peri4n/setup){target="_blank"}

# This Blog

Expand Down
24 changes: 17 additions & 7 deletions site.hs
Expand Up @@ -33,6 +33,23 @@ main = do

-- Process tags
tags <- buildTags postsPattern (fromCapture "tags/*.html")

-- Process articles
match postsPattern $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls

match (fromList ["projects.md", "contact.md", "about.md"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/page.html" pageCtx
>>= loadAndApplyTemplate "templates/default.html" pageCtx
>>= relativizeUrls

-- Process tags pages
tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
Expand All @@ -46,13 +63,6 @@ main = do
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls

-- Process articles
match (postsPattern .||. fromList ["projects.md", "contact.md", "about.md"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls

-- Process index page
match "index.html" $ do
Expand Down
1 change: 1 addition & 0 deletions templates/default.html
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
$if(metaKeywords)$$metaKeywords$$endif$
<title>$title$</title>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="stylesheet" href="/css/main.css" />
</head>
<body>
Expand Down
18 changes: 18 additions & 0 deletions templates/page.html
@@ -0,0 +1,18 @@
<div style="display: flex;">
<!-- Sidebar -->
<aside style="width: 20%; "></aside>
<article style="width: 60%; ">
<header>
<title>$title$</title>
<span class="description">
by <span class="author">$author$</span> on <span class="date">$date$</span>
</span>
</header>
<main>
$body$
</main>
<footer>
This article last edited on the $lastmod$. Last revision: <a href="https://github.com/peri4n/my-site/commit/$revision$">$revision$</a>
</footer>
</article>
</div>
18 changes: 5 additions & 13 deletions templates/post.html
@@ -1,19 +1,11 @@
<div style="display: flex;">
<!-- Sidebar -->
<aside style="
width: 20%;
text-align: right;
">
<span class="tags">
$if(tags)$
$tags$
: Tags
$endif$
</span>
<aside style="width: 20%; text-align: right;">
$if(tags)$
<span class="tags">$tags$ : Tags</span>
$endif$
</aside>
<article style="
width: 60%;
">
<article style="width: 60%;">
<header>
<title>$title$</title>
<span class="description">
Expand Down

0 comments on commit 0e8bb9a

Please sign in to comment.