From 4bbbe2b9f440b7d2e9782ef354305426e2bc30a3 Mon Sep 17 00:00:00 2001 From: wass Date: Sat, 4 May 2024 17:59:07 +0200 Subject: [PATCH] support no home md entry --- src/pages/index.astro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 6fdbdc4..9d12bd0 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,9 +5,12 @@ import {getEntry} from 'content-structure' console.log(`index> home page`) const entry = await getEntry({path:"home/readme.md"}) +const not_empty = !(Object.keys(entry.tree).length == 0) const headings = (Object.hasOwn(entry.data,"toc")&&entry.data.toc == false)?[]:entry.data.headings --- - + {not_empty&& + + }