From 931f307fac6b672f609acb24338430faa4dcf7e3 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Fri, 3 Nov 2023 22:48:38 +0100 Subject: [PATCH] Dynamic menu --- .github/workflows/hugo.yaml | 2 +- hugo.toml | 21 +++++++++++++++++++++ layouts/partials/header.html | 8 +++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index d9ec15b..696f423 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -57,7 +57,7 @@ jobs: hugo \ --gc \ --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/personal-website/" + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: diff --git a/hugo.toml b/hugo.toml index ab90034..50018db 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,3 +1,24 @@ baseURL = 'http://hazemkrimi.tech/' languageCode = 'en-us' title = 'Hazem Krimi' +[menu] + [[menu.main]] + name = 'Home' + url = '/' + weight = 1 + [[menu.main]] + name = 'About' + url = '/about' + weight = 2 + [[menu.main]] + name = 'Projects' + url = '/projects' + weight = 3 + [[menu.main]] + name = 'Blog' + url = '/blog' + weight = 4 + [[menu.main]] + name = 'Contact' + url = '/contact' + weight = 5 diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e6d748e..77e8186 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -24,11 +24,9 @@

Hazem Krimi