From 2c7b0edaf7f85a09a253c2f4e5793d5009076a53 Mon Sep 17 00:00:00 2001 From: grassblock Date: Tue, 13 May 2025 21:28:08 +0800 Subject: [PATCH] feat: custom navbar items and footer --- src/config.ts | 8 ++++++++ src/layouts/Layout.astro | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 81372d1..0ac23a7 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,6 +1,14 @@ export const siteConfig = { title: '/var/log/mercury', description: 'A blog about software development, technology, and life.', + navBarItems: [ + // additional items in the navbar + // the order of the items will be the same as the order in the array + // format is { text: string, link: string } + { text: "RSS", link: "/rss.xml" }, + { text: "GitHub", link: "https://github.com/GrassBlock1/mercury" }, + ], + customFooter: 'I have no mouth, and I must SCREAM', comments: { type: 'fediverse', // 'artalk','giscus','fediverse','hatsu' artalk: { diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 8da33c4..130f335 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -13,6 +13,9 @@ interface Props { const defaultTitle = siteConfig.title const formattedPath = defaultTitle.toLowerCase().replace(/\s+/g, '-'); +const navBarItems = siteConfig.navBarItems +const customFooter = siteConfig.customFooter + const { title, path = formattedPath } = Astro.props; // TODO: make the path dynamic --- @@ -36,6 +39,7 @@ const { title, path = formattedPath } = Astro.props; @@ -52,7 +56,8 @@ const { title, path = formattedPath } = Astro.props;
- Powered by mercury logo mercury + +

Powered by mercury logo mercury