diff --git a/portfolio/en/archive-events.html b/portfolio/en/archive-events.html new file mode 100644 index 0000000..d5548db --- /dev/null +++ b/portfolio/en/archive-events.html @@ -0,0 +1,7 @@ +--- +title: Events archive +logosub: Preserves everything +language: "en" +--- + +$partial("templates/events.html")$ \ No newline at end of file diff --git a/portfolio/en/archive-posts.html b/portfolio/en/archive-posts.html new file mode 100644 index 0000000..db7daa8 --- /dev/null +++ b/portfolio/en/archive-posts.html @@ -0,0 +1,7 @@ +--- +title: Posts archive +logosub: Preserves everything +language: "nl" +--- + +$partial("templates/recent-posts.html")$ \ No newline at end of file diff --git a/portfolio/en/index.html b/portfolio/en/index.html index 82c5dff..175624d 100644 --- a/portfolio/en/index.html +++ b/portfolio/en/index.html @@ -15,14 +15,14 @@ $partial("templates/index.html")$

Recent posts

$partial("templates/recent-posts.html")$ -

…or you can find more posts in the archives.

+

…or you can find more posts in the archives.

Upcoming events

$partial("templates/events.html")$ -

Here you can find more events I attended: events.

+

Here you can find more events I attended: events.

diff --git a/portfolio/jp/archive-events.html b/portfolio/jp/archive-events.html new file mode 100644 index 0000000..a4533f2 --- /dev/null +++ b/portfolio/jp/archive-events.html @@ -0,0 +1,7 @@ +--- +title: Evenementen-archief +logosub: 保存 +language: "jp" +--- + +$partial("templates/events.html")$ \ No newline at end of file diff --git a/portfolio/jp/archive-posts.html b/portfolio/jp/archive-posts.html new file mode 100644 index 0000000..2fb044e --- /dev/null +++ b/portfolio/jp/archive-posts.html @@ -0,0 +1,7 @@ +--- +title: Berichten-archief +logosub: 保存 +language: "jp" +--- + +$partial("templates/recent-posts.html")$ \ No newline at end of file diff --git a/portfolio/jp/index.html b/portfolio/jp/index.html index 567521e..9fcf0b4 100644 --- a/portfolio/jp/index.html +++ b/portfolio/jp/index.html @@ -17,14 +17,14 @@ $partial("templates/index.html")$

最近の投稿

$partial("templates/recent-posts.html")$ -

または、アーカイブでもっと多くの投稿をご覧いただけます。

+

または、アーカイブでもっと多くの投稿をご覧いただけます。

今後のイベント

$partial("templates/events.html")$ -

ここでは、私が参加したイベントをさらにご覧いただけます: イベント

+

ここでは、私が参加したイベントをさらにご覧いただけます: イベント

diff --git a/portfolio/nl/archive-events.html b/portfolio/nl/archive-events.html new file mode 100644 index 0000000..50d2937 --- /dev/null +++ b/portfolio/nl/archive-events.html @@ -0,0 +1,7 @@ +--- +title: Evenementen-archief +logosub: Bewaart alles +language: "nl" +--- + +$partial("templates/events.html")$ \ No newline at end of file diff --git a/portfolio/nl/archive-posts.html b/portfolio/nl/archive-posts.html new file mode 100644 index 0000000..35428fb --- /dev/null +++ b/portfolio/nl/archive-posts.html @@ -0,0 +1,7 @@ +--- +title: Berichten-archief +logosub: Bewaart alles +language: "nl" +--- + +$partial("templates/recent-posts.html")$ \ No newline at end of file diff --git a/portfolio/nl/index.html b/portfolio/nl/index.html index 809a58d..883bd68 100644 --- a/portfolio/nl/index.html +++ b/portfolio/nl/index.html @@ -15,14 +15,14 @@ $partial("templates/index.html")$

Recente berichten

$partial("templates/recent-posts.html")$ -

…of je kunt meer berichten vinden in de archieven.

+

…of je kunt meer berichten vinden in de archieven.

Evenementen

$partial("templates/events.html")$ -

Hier kun je meer evenementen zien waar ik ben geweest: evenementen.

+

Hier kun je meer evenementen zien waar ik ben geweest: evenementen.

diff --git a/portfolio/posts/en/2017-08-03-new-computer.md b/portfolio/posts/en/2017-08-03-new-computer.md index eebc13f..f7aee85 100644 --- a/portfolio/posts/en/2017-08-03-new-computer.md +++ b/portfolio/posts/en/2017-08-03-new-computer.md @@ -23,20 +23,20 @@ I built my computer today. New computer parts
- + New computer parts
diff --git a/portfolio/posts/jp/2017-08-03-new-computer.md b/portfolio/posts/jp/2017-08-03-new-computer.md index c653ac7..b1bdb39 100644 --- a/portfolio/posts/jp/2017-08-03-new-computer.md +++ b/portfolio/posts/jp/2017-08-03-new-computer.md @@ -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. New computer parts
- + New computer parts
diff --git a/portfolio/posts/jp/2025-12-14-new-site.md b/portfolio/posts/jp/2025-12-14-new-site.md index c5552f8..ed4253c 100644 --- a/portfolio/posts/jp/2025-12-14-new-site.md +++ b/portfolio/posts/jp/2025-12-14-new-site.md @@ -1,6 +1,6 @@ --- language: "jp" -title: New site +title: 新しいサイト author: Kevin Matsubara date: 2025-12-14 logosub: Blogger diff --git a/portfolio/posts/jp/2026-01-09-hobby-books.md b/portfolio/posts/jp/2026-01-09-hobby-books.md index bcb8bd7..f27ef24 100644 --- a/portfolio/posts/jp/2026-01-09-hobby-books.md +++ b/portfolio/posts/jp/2026-01-09-hobby-books.md @@ -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 AK Interactive and Mōdiphiüs. diff --git a/portfolio/posts/nl/2017-08-03-new-computer.md b/portfolio/posts/nl/2017-08-03-new-computer.md index ebfad87..22376f5 100644 --- a/portfolio/posts/nl/2017-08-03-new-computer.md +++ b/portfolio/posts/nl/2017-08-03-new-computer.md @@ -23,20 +23,20 @@ Ik heb mijn computer vandaag gebouwd. Nieuwe computeronderdelen
- + Nieuwe computeronderdelen
diff --git a/portfolio/site.hs b/portfolio/site.hs index 4b361b9..8ec5004 100644 --- a/portfolio/site.hs +++ b/portfolio/site.hs @@ -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" diff --git a/portfolio/templates/archive.html b/portfolio/templates/archive.html deleted file mode 100644 index 8f6dabf..0000000 --- a/portfolio/templates/archive.html +++ /dev/null @@ -1,6 +0,0 @@ ---- -language: "en" ---- - -Here you can find all my previous posts: -$partial("templates/post-list.html")$