theme: be compatible with Hugo >= 0.95.0 #397

This commit is contained in:
Sören Weber 2022-11-19 13:40:26 +01:00
parent ea5a7794eb
commit 3624bb38f1
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
{{- $ret := path.Base (strings.TrimSuffix (path.Ext .) .) }}
{{- return $ret }}

View file

@ -3,7 +3,7 @@
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $basename := "index" }}
{{- if eq $outputFormat "searchpage" }}
{{- $basename = path.BaseName $format.RelPermalink }}
{{- $basename = partial "BaseName.hugo" $format.RelPermalink }}
{{- end }}
<html lang="{{ .Page.Language | default "en" }}" dir="{{ T "Reading-direction" | default "ltr" }}">
<head>

View file

@ -4,7 +4,7 @@
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $basename := "index" }}
{{- if ne $outputFormat "html" }}
{{- $basename = path.BaseName $format.RelPermalink }}
{{- $basename = partial "BaseName.hugo" $format.RelPermalink }}
{{- end }}
<aside id="sidebar" class="default-animation{{ if $showvisitedlinks }} showVisitedLinks{{ end }}" dir="ltr">
{{- $currentNode := . }}