From 3a9b920d4981ac28becb9634ec964dc2e2104401 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 29 Oct 2023 11:20:06 +0100 Subject: Remove extra space after Home link --- config.toml | 3 +++ src/templates.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/config.toml b/config.toml index d7eda14..e3a23be 100644 --- a/config.toml +++ b/config.toml @@ -33,6 +33,9 @@ cache-control = "max-age=14400" 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/" 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, child: cheerio.Cheerio, ) { + parent.empty(); for (const link of config.extra.main_menu) { parent.append(child.clone().attr("href", link.url).text(link.name)); } -- cgit 1.4.1