diff --git a/src/components/Branch.astro b/src/components/Branch.astro
index 6fb8740..65d6f20 100644
--- a/src/components/Branch.astro
+++ b/src/components/Branch.astro
@@ -1,10 +1,11 @@
---
import { getCollection } from 'astro:content';
import { SITE_TITLE } from '../consts';
-import { bonsai } from '../wikibonsai/semtree';
+import { buildBonsai } from '../wikibonsai/semtree';
const { nodes } = Astro.props;
+const bonsai = await buildBonsai();
const root = bonsai ? bonsai.root : '';
const treeNodes = bonsai ? bonsai.nodes : [];
---
diff --git a/src/components/BreadCrumbs.astro b/src/components/BreadCrumbs.astro
index 130d3b5..15be13e 100644
--- a/src/components/BreadCrumbs.astro
+++ b/src/components/BreadCrumbs.astro
@@ -1,9 +1,10 @@
---
import { SITE_TITLE } from '../consts';
-import { bonsai } from '../wikibonsai/semtree';
+import { buildBonsai } from '../wikibonsai/semtree';
const { current } = Astro.props;
+const bonsai = await buildBonsai();
const root = bonsai ? bonsai.root : '';
const treeNodes = bonsai ? bonsai.nodes : [];
diff --git a/src/content.config.ts b/src/content.config.ts
index 78dd7cd..0b5e838 100644
--- a/src/content.config.ts
+++ b/src/content.config.ts
@@ -26,7 +26,11 @@ const entries = defineCollection({
});
const index = defineCollection({
- loader: glob({ pattern: '**/*.md', base: './src/content/index' }),
+ loader: glob({
+ pattern: '**/*.md',
+ base: './src/content/index',
+ generateId: ({ entry }) => entry.replace(/\.md$/, ''),
+ }),
schema: z.object({
title: z.string(),
}),
diff --git a/src/pages/entries/index.astro b/src/pages/entries/index.astro
new file mode 100644
index 0000000..309aa6c
--- /dev/null
+++ b/src/pages/entries/index.astro
@@ -0,0 +1,33 @@
+---
+import Base from '../../layouts/Base.astro';
+import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts';
+import { getCollection } from 'astro:content';
+
+const entries = (await getCollection('entries'))
+ .sort((a, b) => (b.data.updatedDate ?? b.data.pubDate ?? new Date(0)).valueOf()
+ - (a.data.updatedDate ?? a.data.pubDate ?? new Date(0)).valueOf());
+---
+
+
No pages yet.
+ )} +