Add about pages and link

This commit is contained in:
Sven Wehrend 2024-12-28 16:37:00 +01:00
parent 28c6a073b8
commit 3c855e6d4d
7 changed files with 33 additions and 4 deletions

View File

@ -1,4 +1,7 @@
--- ---
title: About title: About
type: docs type: docs
--- draft: false
---
Welcome to the english about page

View File

@ -1,4 +1,7 @@
--- ---
title: <Hebrew about> title: <Hebrew about>
type: docs type: docs
--- draft: false
---
Welcome to the hewbrew about page

View File

@ -1,4 +1,7 @@
--- ---
title: 關於 title: 關於
type: docs type: docs
--- draft: false
---
Welcome to the chinese about page

View File

@ -37,8 +37,17 @@ enableGitInfo = true
languageDirection = 'rtl' languageDirection = 'rtl'
weight = 3 weight = 3
[menu]
# [[menu.before]] # [[menu.before]]
[[menu.main]]
name = "Home"
url = "/"
weight = 4
[[menu.main]]
name = "About"
url = "/about/"
weight = 5
[[menu.after]] [[menu.after]]
name = "Github" name = "Github"
url = "https://github.com/alex-shpak/hugo-book" url = "https://github.com/alex-shpak/hugo-book"

View File

@ -37,7 +37,11 @@ languages:
menu: menu:
# before: [] # before: []
after: after:
- name: "About"
url: "/about"
weight: 5
- name: "Github" - name: "Github"
url: "https://github.com/alex-shpak/hugo-book" url: "https://github.com/alex-shpak/hugo-book"
weight: 10 weight: 10

View File

@ -12,3 +12,9 @@
- id: bookSearchConfig - id: bookSearchConfig
translation: '{ cache: true }' translation: '{ cache: true }'
- id: home
translation: home
- id: about
translation: About

View File

@ -14,6 +14,7 @@
{{ partial "docs/inject/menu-after" . }} {{ partial "docs/inject/menu-after" . }}
</nav> </nav>
<a href="{{ "about" | relLangURL }}">About</a>
<!-- Restore menu position as soon as possible to avoid flickering --> <!-- Restore menu position as soon as possible to avoid flickering -->
{{ $script := resources.Get "menu-reset.js" | resources.Minify }} {{ $script := resources.Get "menu-reset.js" | resources.Minify }}
{{ with $script.Content }} {{ with $script.Content }}