diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d9ac9c4..3f869bd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: 0.146.7 + hugo-version: 0.158.0 extended: true - name: Run Hugo working-directory: exampleSite diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe29715..32c1b99 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: matrix: hugo-version: - 'latest' - - '0.146.7' + - '0.158.0' steps: - uses: actions/checkout@v4 with: diff --git a/README.md b/README.md index b70da09..67a4514 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hugo Book Theme -[![Hugo](https://img.shields.io/badge/hugo-0.146-blue.svg)](https://gohugo.io) +[![Hugo](https://img.shields.io/badge/hugo-0.158-blue.svg)](https://gohugo.io) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) ![Build with Hugo](https://github.com/alex-shpak/hugo-book/workflows/Build%20with%20Hugo/badge.svg) @@ -33,7 +33,7 @@ ## Requirements -- Hugo 0.146 or higher +- Hugo 0.158 or higher - Hugo extended version, [Installation Instructions](https://gohugo.io/installation/) ## Installation diff --git a/assets/search.js b/assets/search.js index a8f7fe4..d2f870b 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1,6 +1,6 @@ 'use strict'; -{{ $searchDataFile := printf "%s.search-data.json" .Language.Lang }} +{{ $searchDataFile := printf "%s.search-data.json" .Language.Name }} {{ $searchData := resources.Get "search-data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }} {{ $searchConfig := i18n "bookSearchConfig" | default "{}" }} diff --git a/exampleSite/content.en/_index.md b/exampleSite/content.en/_index.md index 7d91499..e5f4ed0 100644 --- a/exampleSite/content.en/_index.md +++ b/exampleSite/content.en/_index.md @@ -8,7 +8,7 @@ layout: landing # HUGO BOOK {anchor=false} [Hugo](https://gohugo.io) documentation theme as simple as plain book -[{{< badge style="info" title="Hugo" value="0.146" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.146.7) +[{{< badge style="info" title="Hugo" value="0.158" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.158.0) [{{< badge style="default" title="License" value="MIT" >}}](https://github.com/alex-shpak/hugo-book/blob/main/LICENSE) {{}} diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index d14bb86..2d98f1c 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -31,19 +31,19 @@ enableGitInfo = true # And https://gohugo.io/content-management/multilingual/#translation-by-content-directory [languages] [languages.en] - languageName = 'English' + label = 'English' contentDir = 'content.en' weight = 1 [languages.zh] - languageName = 'Chinese' + label = 'Chinese' contentDir = 'content.zh' weight = 2 [languages.he] - languageName = 'Hebrew' + label = 'Hebrew' contentDir = 'content.he' - languageDirection = 'rtl' + direction = 'rtl' weight = 3 [menu] diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 192cf42..6f2df14 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -30,17 +30,17 @@ markup: # And https://gohugo.io/content-management/multilingual/#translation-by-content-directory languages: en: - languageName: English + label: English contentDir: content.en weight: 1 zh: - languageName: Chinese + label: Chinese contentDir: content.zh weight: 2 he: - languageName: Hebrew + label: Hebrew contentDir: content.he - languageDirection: rtl + direction: rtl weight: 3 menu: diff --git a/hugo.toml b/hugo.toml index 73a49bc..2751a2a 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,4 @@ [module] [module.hugoVersion] extended = true - min = "0.146.0" \ No newline at end of file + min = "0.158.0" diff --git a/layouts/404.html b/layouts/404.html index 42ee60a..973d5eb 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,5 @@ - + {{ partial "docs/html-head" . }} {{ partial "docs/inject/head" . }} diff --git a/layouts/_partials/docs/html-head.html b/layouts/_partials/docs/html-head.html index 769ee0f..31d32ad 100644 --- a/layouts/_partials/docs/html-head.html +++ b/layouts/_partials/docs/html-head.html @@ -25,7 +25,7 @@ https://github.com/alex-shpak/hugo-book {{- range .Translations }} - + {{- end -}} @@ -34,7 +34,7 @@ https://github.com/alex-shpak/hugo-book {{- if default true .Site.Params.BookSearch -}} - {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} + {{- $searchJSFile := printf "%s.search.js" .Language.Name }} {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} diff --git a/layouts/_partials/docs/languages.html b/layouts/_partials/docs/languages.html index bcdf3f5..b2a8fa6 100644 --- a/layouts/_partials/docs/languages.html +++ b/layouts/_partials/docs/languages.html @@ -2,11 +2,11 @@ {{ $translations := dict }} {{ if (eq $bookTranslatedOnly false ) }} {{ range .Site.Home.Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} + {{ $translations = merge $translations (dict .Language.Name .) }} {{ end }} {{ end }} {{ range .Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} + {{ $translations = merge $translations (dict .Language.Name .) }} {{ end }}