Add archives for events and posts.
This commit is contained in:
parent
8a6e700e1c
commit
9fee1210a5
7
portfolio/en/archive-events.html
Normal file
7
portfolio/en/archive-events.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Events archive
|
||||
logosub: Preserves everything
|
||||
language: "en"
|
||||
---
|
||||
|
||||
$partial("templates/events.html")$
|
||||
7
portfolio/en/archive-posts.html
Normal file
7
portfolio/en/archive-posts.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Posts archive
|
||||
logosub: Preserves everything
|
||||
language: "nl"
|
||||
---
|
||||
|
||||
$partial("templates/recent-posts.html")$
|
||||
@ -15,14 +15,14 @@ $partial("templates/index.html")$
|
||||
<h4>Recent posts</h4>
|
||||
$partial("templates/recent-posts.html")$
|
||||
|
||||
<p>…or you can find more posts in the <a href="/archive.html">archives</a>.</p>
|
||||
<p>…or you can find more posts in the <a href="/en/archive-posts.html">archives</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>Upcoming events</h4>
|
||||
$partial("templates/events.html")$
|
||||
|
||||
<p>Here you can find more events I attended: <a href="/events.html">events</a>.</p>
|
||||
<p>Here you can find more events I attended: <a href="/en/archive-events.html">events</a>.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
7
portfolio/jp/archive-events.html
Normal file
7
portfolio/jp/archive-events.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Evenementen-archief
|
||||
logosub: 保存
|
||||
language: "jp"
|
||||
---
|
||||
|
||||
$partial("templates/events.html")$
|
||||
7
portfolio/jp/archive-posts.html
Normal file
7
portfolio/jp/archive-posts.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Berichten-archief
|
||||
logosub: 保存
|
||||
language: "jp"
|
||||
---
|
||||
|
||||
$partial("templates/recent-posts.html")$
|
||||
@ -17,14 +17,14 @@ $partial("templates/index.html")$
|
||||
<h4>最近の投稿</h4>
|
||||
$partial("templates/recent-posts.html")$
|
||||
|
||||
<p>または、<a href="/archive.html">アーカイブ</a>でもっと多くの投稿をご覧いただけます。</p>
|
||||
<p>または、<a href="/jp/archive-posts.html">アーカイブ</a>でもっと多くの投稿をご覧いただけます。</p>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>今後のイベント</h4>
|
||||
$partial("templates/events.html")$
|
||||
|
||||
<p>ここでは、私が参加したイベントをさらにご覧いただけます: <a href="/events.html">イベント</a></p>
|
||||
<p>ここでは、私が参加したイベントをさらにご覧いただけます: <a href="/jp/archive-events.html">イベント</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
7
portfolio/nl/archive-events.html
Normal file
7
portfolio/nl/archive-events.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Evenementen-archief
|
||||
logosub: Bewaart alles
|
||||
language: "nl"
|
||||
---
|
||||
|
||||
$partial("templates/events.html")$
|
||||
7
portfolio/nl/archive-posts.html
Normal file
7
portfolio/nl/archive-posts.html
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Berichten-archief
|
||||
logosub: Bewaart alles
|
||||
language: "nl"
|
||||
---
|
||||
|
||||
$partial("templates/recent-posts.html")$
|
||||
@ -15,14 +15,14 @@ $partial("templates/index.html")$
|
||||
<h4>Recente berichten</h4>
|
||||
$partial("templates/recent-posts.html")$
|
||||
|
||||
<p>…of je kunt meer berichten vinden in de <a href="/archive.html">archieven</a>.</p>
|
||||
<p>…of je kunt meer berichten vinden in de <a href="/nl/archive-posts.html">archieven</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>Evenementen</h4>
|
||||
$partial("templates/events.html")$
|
||||
|
||||
<p>Hier kun je meer evenementen zien waar ik ben geweest: <a href="/events.html">evenementen</a>.</p>
|
||||
<p>Hier kun je meer evenementen zien waar ik ben geweest: <a href="/nl/archive-events.html">evenementen</a>.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -23,20 +23,20 @@ I built my computer today.
|
||||
<picture class="d-flex justify-content-center">
|
||||
<source
|
||||
media="(max-width: 510px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w240.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w240.webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 850px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w480.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w480.webp"
|
||||
/>
|
||||
<img
|
||||
src="/images/posts/2018/20170802_230030-w800.webp"
|
||||
src="/images/posts/2017/20170802_230030-w800.webp"
|
||||
alt="New computer parts"
|
||||
class="img-fluid"
|
||||
/>
|
||||
</picture>
|
||||
<figcaption class="figure-caption mt-2">
|
||||
<a href="/images/posts/2018/20170802_230030-w800.webp">
|
||||
<a href="/images/posts/2017/20170802_230030-w800.webp">
|
||||
New computer parts
|
||||
</a>
|
||||
</figcaption>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
language: "jp"
|
||||
title: New computer
|
||||
title: 新しいコンピュータ
|
||||
author: Kevin Matsubara
|
||||
date: 2017-08-03
|
||||
logosub: Back when parts were affordable
|
||||
---
|
||||
|
||||
I built my computer today.
|
||||
今日は新しいコンピュータを片付けました。
|
||||
|
||||
* Casing: Fracture Design Define R5
|
||||
* Motherboard: Asus Prime X370-Pro
|
||||
@ -23,20 +23,20 @@ I built my computer today.
|
||||
<picture class="d-flex justify-content-center">
|
||||
<source
|
||||
media="(max-width: 510px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w240.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w240.webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 850px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w480.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w480.webp"
|
||||
/>
|
||||
<img
|
||||
src="/images/posts/2018/20170802_230030-w800.webp"
|
||||
src="/images/posts/2017/20170802_230030-w800.webp"
|
||||
alt="New computer parts"
|
||||
class="img-fluid"
|
||||
/>
|
||||
</picture>
|
||||
<figcaption class="figure-caption mt-2">
|
||||
<a href="/images/posts/2018/20170802_230030-w800.webp">
|
||||
<a href="/images/posts/2017/20170802_230030-w800.webp">
|
||||
New computer parts
|
||||
</a>
|
||||
</figcaption>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
language: "jp"
|
||||
title: New site
|
||||
title: 新しいサイト
|
||||
author: Kevin Matsubara
|
||||
date: 2025-12-14
|
||||
logosub: Blogger
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
---
|
||||
language: "jp"
|
||||
title: Hobby books
|
||||
title: 趣味の本
|
||||
author: Kevin Matsubara
|
||||
date: 2026-01-09
|
||||
logosub: Likes reading books
|
||||
logosub: 本を好き
|
||||
---
|
||||
|
||||
I bought some new hobby books from <a href="https://ak-interactive.com/">AK Interactive</a> and <a href="https://modiphius.net/">Mōdiphiüs</a>.
|
||||
|
||||
@ -23,20 +23,20 @@ Ik heb mijn computer vandaag gebouwd.
|
||||
<picture class="d-flex justify-content-center">
|
||||
<source
|
||||
media="(max-width: 510px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w240.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w240.webp"
|
||||
/>
|
||||
<source
|
||||
media="(max-width: 850px)"
|
||||
srcset="/images/posts/2018/20170802_230030-w480.webp"
|
||||
srcset="/images/posts/2017/20170802_230030-w480.webp"
|
||||
/>
|
||||
<img
|
||||
src="/images/posts/2018/20170802_230030-w800.webp"
|
||||
src="/images/posts/2017/20170802_230030-w800.webp"
|
||||
alt="Nieuwe computeronderdelen"
|
||||
class="img-fluid"
|
||||
/>
|
||||
</picture>
|
||||
<figcaption class="figure-caption mt-2">
|
||||
<a href="/images/posts/2018/20170802_230030-w800.webp">
|
||||
<a href="/images/posts/2017/20170802_230030-w800.webp">
|
||||
Nieuwe computeronderdelen
|
||||
</a>
|
||||
</figcaption>
|
||||
|
||||
@ -130,27 +130,6 @@ main = hakyll $ do
|
||||
>>= loadAndApplyTemplate "templates/default.html" (postCtx lang)
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["archive.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
posts <- recentFirst =<< loadAll "posts/*"
|
||||
let archiveCtx =
|
||||
listField "posts" (postCtx lang) (return posts) <>
|
||||
constField "title" "Archives" <>
|
||||
constField "language" lang <>
|
||||
langDict lang <>
|
||||
defaultContext
|
||||
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList
|
||||
[ "nl/plamo.html"
|
||||
, "jp/plamo.html"
|
||||
@ -369,6 +348,54 @@ main = hakyll $ do
|
||||
>>= loadAndApplyTemplate "templates/default.html" paintsCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList
|
||||
[ "nl/archive-events.html"
|
||||
, "jp/archive-events.html"
|
||||
, "en/archive-events.html"
|
||||
]) $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
events <- recentFirst =<< loadAll (fromGlob ("events/" ++ lang ++ "/*"))
|
||||
|
||||
let eventsCtx =
|
||||
listField "events" (postCtx lang) (return events) <>
|
||||
langDict lang <>
|
||||
defaultContext
|
||||
|
||||
getResourceBody
|
||||
>>= applyAsTemplate eventsCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" eventsCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList
|
||||
[ "nl/archive-posts.html"
|
||||
, "jp/archive-posts.html"
|
||||
, "en/archive-posts.html"
|
||||
]) $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
posts <- recentFirst =<< loadAll (fromGlob ("posts/" ++ lang ++ "/*"))
|
||||
|
||||
let postsCtx =
|
||||
listField "posts" (postCtx lang) (return posts) <>
|
||||
langDict lang <>
|
||||
defaultContext
|
||||
|
||||
getResourceBody
|
||||
>>= applyAsTemplate postsCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postsCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList
|
||||
[ "index.html"
|
||||
, "nl/index.html"
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
---
|
||||
language: "en"
|
||||
---
|
||||
|
||||
Here you can find all my previous posts:
|
||||
$partial("templates/post-list.html")$
|
||||
Loading…
x
Reference in New Issue
Block a user