From 3c855e6d4d2bc2fa47ba530f3942bd5780575a9b Mon Sep 17 00:00:00 2001 From: Sven Wehrend Date: Sat, 28 Dec 2024 16:37:00 +0100 Subject: [PATCH] Add about pages and link --- exampleSite/content.en/about.md | 5 ++++- exampleSite/content.he/about.md | 5 ++++- exampleSite/content.zh/about.md | 5 ++++- exampleSite/hugo.toml | 11 ++++++++++- exampleSite/hugo.yaml | 4 ++++ i18n/en.yaml | 6 ++++++ layouts/partials/docs/menu.html | 1 + 7 files changed, 33 insertions(+), 4 deletions(-) diff --git a/exampleSite/content.en/about.md b/exampleSite/content.en/about.md index ede1095..10e50a0 100644 --- a/exampleSite/content.en/about.md +++ b/exampleSite/content.en/about.md @@ -1,4 +1,7 @@ --- title: About type: docs ---- \ No newline at end of file +draft: false +--- + +Welcome to the english about page \ No newline at end of file diff --git a/exampleSite/content.he/about.md b/exampleSite/content.he/about.md index f54d2e6..d1e5a92 100644 --- a/exampleSite/content.he/about.md +++ b/exampleSite/content.he/about.md @@ -1,4 +1,7 @@ --- title: type: docs ---- \ No newline at end of file +draft: false +--- + +Welcome to the hewbrew about page \ No newline at end of file diff --git a/exampleSite/content.zh/about.md b/exampleSite/content.zh/about.md index d2bd4ce..026faf3 100644 --- a/exampleSite/content.zh/about.md +++ b/exampleSite/content.zh/about.md @@ -1,4 +1,7 @@ --- title: 關於 type: docs ---- \ No newline at end of file +draft: false +--- + +Welcome to the chinese about page \ No newline at end of file diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 34af293..239bb20 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -37,8 +37,17 @@ enableGitInfo = true languageDirection = 'rtl' weight = 3 -[menu] # [[menu.before]] +[[menu.main]] + name = "Home" + url = "/" + weight = 4 + +[[menu.main]] + name = "About" + url = "/about/" + weight = 5 + [[menu.after]] name = "Github" url = "https://github.com/alex-shpak/hugo-book" diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 3fd0c40..3699875 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -37,7 +37,11 @@ languages: menu: # before: [] + after: + - name: "About" + url: "/about" + weight: 5 - name: "Github" url: "https://github.com/alex-shpak/hugo-book" weight: 10 diff --git a/i18n/en.yaml b/i18n/en.yaml index 94b9c77..2755620 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -12,3 +12,9 @@ - id: bookSearchConfig translation: '{ cache: true }' + +- id: home + translation: home + +- id: about + translation: About \ No newline at end of file diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index dbb2e49..0f7df19 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -14,6 +14,7 @@ {{ partial "docs/inject/menu-after" . }} +About {{ $script := resources.Get "menu-reset.js" | resources.Minify }} {{ with $script.Content }}