From 6ba7b4afe56d407783c56804f7a238075ad5879e Mon Sep 17 00:00:00 2001 From: Korbs Date: Mon, 10 Jun 2024 21:36:01 -0400 Subject: [PATCH] Make menu links configurable --- config.json | 41 ++++++++++++++++++++++++++++++ src/components/global/Header.astro | 14 +++++----- 2 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..7f17d6c --- /dev/null +++ b/config.json @@ -0,0 +1,41 @@ +{ + "HeaderItems": [ + { + "text": "Link", + "link": "#" + }, + { + "text": "Link", + "link": "#" + }, + { + "text": "Link", + "link": "#" + } + ], + "SidebarItems": [ + { + "heading": "Heading" + }, + { + "text": "Document Title", + "link": "#" + }, + { + "text": "Document Title", + "link": "#" + }, + { + "text": "Document Title", + "link": "#" + }, + { + "text": "Document Title", + "link": "#" + }, + { + "text": "Document Title", + "link": "#" + } + ] +} \ No newline at end of file diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro index 9cf8ec8..fe5d5e7 100644 --- a/src/components/global/Header.astro +++ b/src/components/global/Header.astro @@ -1,11 +1,11 @@ --- // Environment Variables import { - SITE_NAME, - META_COLOR, - COLOR, - THEME + SITE_NAME } from '@utils/GetConfig' + +// Configuration +import { HeaderItems } from '../../../config.json' ---
@@ -14,9 +14,9 @@ import {

{SITE_NAME}

- Link - Social - Status + {HeaderItems.map((item) => ( + {item.text} + ))}
\ No newline at end of file