Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use hugo.IsMultilingual to replace deprecated .Site.IsMultiLingual #404

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ We recommend that you search existing [issues][issues] or discussions before ope

### Local development setup

- [Hugo][hugo] >= v0.115.0 (extended version)
- [Hugo][hugo] >= v0.124.0 (extended version)
- [Node.js][nodejs]
- [Go][go]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.124.1
HUGO_VERSION: 0.126.1
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{- partial "language-switch.html" (dict "context" .) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle.html" }}{{ end -}}
</div>
{{- if or site.IsMultiLingual $displayThemeToggle -}}
{{- if or hugo.IsMultilingual $displayThemeToggle -}}
<hr class="dark:hx-border-neutral-800" />
{{- end -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/language-switch.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{{- $changeLanguage := (T "changeLanguage") | default "Change language" -}}

{{- if site.IsMultiLingual -}}
{{- if hugo.IsMultilingual -}}
<div class="hx-flex hx-justify-items-start {{ if $grow }}hx-grow{{ end }}">
<button
title="{{ $changeLanguage }}"
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{ $switchesClass := cond $disableSidebar "md:hx-hidden" "" -}}
{{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}}

{{ if or site.IsMultiLingual $displayThemeToggle }}
<div class="{{ $switchesClass }} {{ with site.IsMultiLingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show">
{{- with site.IsMultiLingual -}}
{{ if or hugo.IsMultilingual $displayThemeToggle }}
<div class="{{ $switchesClass }} {{ with hugo.IsMultilingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show">
{{- with hugo.IsMultilingual -}}
{{- partial "language-switch" (dict "context" $context "grow" true) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}}
{{- else -}}
Expand Down
4 changes: 3 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
ignore = "false"

[build.environment]
HUGO_VERSION = "0.117.0"
HUGO_VERSION = "0.126.1"
GO_VERSION = "1.22.3"
NODE_VERSION = "22.2.0"
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://github.com/imfing/hextra/"
demosite = "https://imfing.github.io/hextra/"
tags = ["Modern", "Elegant", "Blog", "Documentation", "Responsive", "Clean", "Light", "Dark", "Minimal"]
features = ["Responsive", "Dark Mode", "Search", "Syntax Highlighting", "Multilingual", "Social", "Blog", "RSS", "Customization"]
min_version = "0.111.0"
min_version = "0.124.0"

[author]
name = "Xin"
Expand Down