1
0

Add basic events.

This commit is contained in:
Kevin Matsubara 2025-12-16 20:33:43 +01:00
parent 1a24e8f601
commit a8f97f4a36
5 changed files with 47 additions and 3 deletions

View File

@ -0,0 +1,10 @@
---
title: SMC 2025 - Scale Model Challenge
author: Kevin Matsubara
date: 2025-10-18
logosub: Congoer
---
I have been to the Scale Model Challenge, this being my second time now.
And I participated with a Gundam, but did not win any prize with it. Still, it was fun to add my Gundam figure to the competition. Next time I will have to do a better job!

View File

@ -12,4 +12,9 @@ logosub: Personal weblog
<h4>Recent posts</h4>
$partial("templates/recent-posts.html")$
<p>…or you can find more in the <a href="/archive.html">archives</a>.</p>
<p>…or you can find more posts in the <a href="/archive.html">archives</a>.</p>
<h4>Events</h4>
$partial("templates/events.html")$
<p>Here you can find more events I attended: <a href="/events.html">events</a>.</p>

View File

@ -32,6 +32,13 @@ main = hakyll $ do
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls
match "events/*" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/event.html" postCtx
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls
match "pages/en/plamo/gundam/*" $ do
route $ setExtension "html"
compile $ pandocCompiler
@ -72,8 +79,12 @@ main = hakyll $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
events <- recentFirst =<< loadAll "events/*"
let indexCtx =
listField "posts" postCtx (return posts) `mappend`
-- (<> is the modern version of `mappend`.)
listField "posts" postCtx (return posts) <>
listField "events" postCtx (return events) <>
defaultContext
getResourceBody

View File

@ -0,0 +1,11 @@
<article>
<section class="header">
Posted on $date$
$if(author)$
by $author$
$endif$
</section>
<section>
$body$
</section>
</article>

View File

@ -0,0 +1,7 @@
<ul>
$for(events)$
<li>
$date$ - <a href="$url$">$title$</a>
</li>
$endfor$
</ul>