From 0d9d84ab686338501fd750409e66d6f750375391 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:49:09 +0200 Subject: [PATCH] Add search for blog articles --- src/components/Nav.astro | 1 - src/pages/blog/index.astro | 62 +++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/src/components/Nav.astro b/src/components/Nav.astro index 4807ad2..84c0f59 100644 --- a/src/components/Nav.astro +++ b/src/components/Nav.astro @@ -49,6 +49,5 @@ const routes = ["blog", "tracks"]; }; setToggleListener(); - document.addEventListener("astro:after-swap", setToggleListener); diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 0fe33da..42f4e29 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -13,9 +13,21 @@ const sortedArticles = allArticles.sort((a, b) => { title="Blog" description="Friendly technical articles with a focus on web and GNU/Linux topics." > +
+ + +
{ sortedArticles.map(({ id, data: { title, pubDate, description } }) => ( -
+
{
)) } + + +