From 095c92dc87232293ee346ea5bfcfa6132d8ad4d5 Mon Sep 17 00:00:00 2001 From: Novampr Date: Thu, 10 Sep 2026 13:50:18 +0100 Subject: [PATCH 1/2] Allow articles to be loaded again, but disable existing articles, only show news ticker when we have articles --- .../markdown/articles/connecting-bedrock.md | 1 + src/lib/assets/markdown/articles/eu-meetup.md | 1 + .../markdown/articles/geyser-tshirts.md | 1 + .../components/ui/mini-blog/NewsTicker.svelte | 1 - src/routes/+page.svelte | 10 +++++++- src/routes/articles/[slug]/+page.server.ts | 3 +++ src/routes/articles/[slug]/+page.svelte | 24 ------------------- 7 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/lib/assets/markdown/articles/connecting-bedrock.md b/src/lib/assets/markdown/articles/connecting-bedrock.md index aa4dc4b..4163cd6 100644 --- a/src/lib/assets/markdown/articles/connecting-bedrock.md +++ b/src/lib/assets/markdown/articles/connecting-bedrock.md @@ -4,6 +4,7 @@ description: "" date: "2025-07-01" image: "/articleImages/df.png" slug: "connecting-bedrock" +disabled: "true" --- # Introducing: The Open Collaboration Discord diff --git a/src/lib/assets/markdown/articles/eu-meetup.md b/src/lib/assets/markdown/articles/eu-meetup.md index d653e07..ae96a88 100644 --- a/src/lib/assets/markdown/articles/eu-meetup.md +++ b/src/lib/assets/markdown/articles/eu-meetup.md @@ -4,6 +4,7 @@ description: "It's nice to meet people you've only ever seen online!" date: "2025-11-09" image: "/articleImages/the-hague-canals.jpg" slug: "eu-meetup" +disabled: "true" --- # Geyser and Cloudburst Meetup 2025 diff --git a/src/lib/assets/markdown/articles/geyser-tshirts.md b/src/lib/assets/markdown/articles/geyser-tshirts.md index f95b691..23f57ab 100644 --- a/src/lib/assets/markdown/articles/geyser-tshirts.md +++ b/src/lib/assets/markdown/articles/geyser-tshirts.md @@ -4,6 +4,7 @@ description: "For Geyser's 6th birthday: Time to code in style" date: "2025-11-20" image: "/articleImages/geyser-tshirts.jpg" slug: "geyser-tshirts" +disabled: "true" --- # Geyser T-Shirts diff --git a/src/lib/components/ui/mini-blog/NewsTicker.svelte b/src/lib/components/ui/mini-blog/NewsTicker.svelte index 345613c..50ad87d 100644 --- a/src/lib/components/ui/mini-blog/NewsTicker.svelte +++ b/src/lib/components/ui/mini-blog/NewsTicker.svelte @@ -3,7 +3,6 @@ import { fly, fade } from "svelte/transition"; let { articles } = $props(); - console.log(articles); const itemsPerPage = 4; let currentPage = $state(1); diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3b29afe..95b0f2b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,6 +6,12 @@ import NewsTicker from "$lib/components/ui/mini-blog/NewsTicker.svelte"; let { data } = $props(); + + const enabledArticles = []; + + for (const article of data.articles) { + if (article.disabled !== "true") enabledArticles.push(article); + } @@ -13,7 +19,9 @@ - +{#if enabledArticles.length > 0} + +{/if} \ No newline at end of file diff --git a/src/routes/articles/[slug]/+page.server.ts b/src/routes/articles/[slug]/+page.server.ts index 59d754a..c7cc13c 100644 --- a/src/routes/articles/[slug]/+page.server.ts +++ b/src/routes/articles/[slug]/+page.server.ts @@ -16,6 +16,9 @@ export function load({ params }) { const { attributes, body } = frontMatter(fileContent); + console.log(attributes); + if (attributes.disabled === "true") throw error(404, "Article not found"); + const content = marked.parse(body); return { diff --git a/src/routes/articles/[slug]/+page.svelte b/src/routes/articles/[slug]/+page.svelte index 605ab21..921aab7 100644 --- a/src/routes/articles/[slug]/+page.svelte +++ b/src/routes/articles/[slug]/+page.svelte @@ -4,8 +4,6 @@ let { data }: { data: PageData } = $props(); - - - - Coming soon! - - - -
-
-
-

- Coming soon! -

-

- We're working on this... please be patient. -

-
-
\ No newline at end of file From fdc90cb625755ea57d61e6e098da96cf20159735 Mon Sep 17 00:00:00 2001 From: Novampr Date: Thu, 10 Sep 2026 13:52:52 +0100 Subject: [PATCH 2/2] Don't log the attributes --- src/routes/articles/[slug]/+page.server.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/articles/[slug]/+page.server.ts b/src/routes/articles/[slug]/+page.server.ts index c7cc13c..7e7abd1 100644 --- a/src/routes/articles/[slug]/+page.server.ts +++ b/src/routes/articles/[slug]/+page.server.ts @@ -16,7 +16,6 @@ export function load({ params }) { const { attributes, body } = frontMatter(fileContent); - console.log(attributes); if (attributes.disabled === "true") throw error(404, "Article not found"); const content = marked.parse(body);