about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.toml3
-rw-r--r--src/templates.ts1
2 files changed, 4 insertions, 0 deletions
diff --git a/config.toml b/config.toml
index d7eda14..e3a23be 100644
--- a/config.toml
+++ b/config.toml
@@ -34,6 +34,9 @@ x-content-type-options = "nosniff"
 content-security-policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'self'; style-src 'unsafe-inline'; form-action 'none'; base-uri 'self'; frame-ancestors https://kagi.com;"
 
 [[extra.main_menu]]
+    name = "Home"
+    url = "/"
+[[extra.main_menu]]
     name = "Posts"
     url = "/post/"
 [[extra.main_menu]]
diff --git a/src/templates.ts b/src/templates.ts
index a9fd857..0a0de83 100644
--- a/src/templates.ts
+++ b/src/templates.ts
@@ -16,6 +16,7 @@ function addMenu(
   parent: cheerio.Cheerio<cheerio.AnyNode>,
   child: cheerio.Cheerio<cheerio.AnyNode>,
 ) {
+  parent.empty();
   for (const link of config.extra.main_menu) {
     parent.append(child.clone().attr("href", link.url).text(link.name));
   }