mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: be compatible with Hugo >= 0.95.0 #397
This commit is contained in:
parent
ea5a7794eb
commit
3624bb38f1
3 changed files with 4 additions and 2 deletions
2
layouts/partials/BaseName.hugo
Normal file
2
layouts/partials/BaseName.hugo
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- $ret := path.Base (strings.TrimSuffix (path.Ext .) .) }}
|
||||
{{- return $ret }}
|
|
@ -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>
|
||||
|
|
|
@ -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 := . }}
|
||||
|
|
Loading…
Reference in a new issue