Skip to content

Commit

Permalink
Hugo: replace 'menuTitle' w/ 'linkTitle' (#235)
Browse files Browse the repository at this point in the history
this should prepare us for Relearn 5.24.0 - menuTitle being deprecated
  • Loading branch information
cagix authored Feb 17, 2024
1 parent 6abc3e6 commit 3f6781b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/hugo-lecture/subdir/leaf/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: "chapter"
title: "Thema SubDir/Leaf"
menuTitle: "SubDir/Leaf"
linkTitle: "SubDir/Leaf"
---


Expand Down
2 changes: 1 addition & 1 deletion examples/hugo-lecture/subdir/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: "chapter"
title: "Thema SubDir"
menuTitle: "SubDir"
linkTitle: "SubDir"
---


Expand Down
2 changes: 1 addition & 1 deletion hugo/hugo-lecture/archetypes/chapter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: default
title: "{{ replace .Name '-' ' ' | title }}"
menuTitle: "{{ replace .Name '-' ' ' | title }}"
linkTitle: "{{ replace .Name '-' ' ' | title }}"
weight: 5
#hidden: true
---
Expand Down
2 changes: 1 addition & 1 deletion hugo/hugo-lecture/archetypes/lecture-bc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: lecture-bc
title: "{{ replace .Name '-' ' ' | title }}"
menuTitle: "{{ replace .Name '-' ' ' | title }}"
linkTitle: "{{ replace .Name '-' ' ' | title }}"
author: "BC George (HSBI)"
weight: 5
readings:
Expand Down
2 changes: 1 addition & 1 deletion hugo/hugo-lecture/archetypes/lecture-cg.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: lecture-cg
title: "{{ replace .Name '-' ' ' | title }}"
menuTitle: "{{ replace .Name '-' ' ' | title }}"
linkTitle: "{{ replace .Name '-' ' ' | title }}"
author: "Carsten Gips (HSBI)"
weight: 5
readings:
Expand Down
2 changes: 1 addition & 1 deletion hugo/hugo-lecture/archetypes/lecture-cy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
archetype: lecture-cy
title: "{{ replace .Name '-' ' ' | title }}"
menuTitle: "{{ replace .Name '-' ' ' | title }}"
linkTitle: "{{ replace .Name '-' ' ' | title }}"
author: "Canan Yıldız (Türkisch-Deutsche Universität)"
weight: 5
readings:
Expand Down
4 changes: 2 additions & 2 deletions hugo/hugo-lecture/layouts/shortcodes/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{{ $path := .File.Dir | path.Clean }}
{{ $path = replace ($path | path.Clean) "/" " > " | upper }}
{{if gt (len $path) 1}}{{ printf "%s > " $path }}{{end}}
{{ $title := .Params.menutitle | default .Title }}
{{ $title := .Params.linkTitle | default .Title }}
<a href="{{- .Permalink | safeURL -}}"><strong>{{- $title -}}</strong></a>
{{ if $leader }}{{ printf " (%s)" $leader }}{{ end }}
{{ if $notes }}<br><em>{{ printf "Hinweis: %s" $notes }}</em>{{ end }}
Expand All @@ -64,7 +64,7 @@
{{ if $topic }}
{{ with $.Site.GetPage $topic }}
<li>
{{ $title := .Params.menutitle | default .Title }}
{{ $title := .Params.linkTitle | default .Title }}
<a href="{{- .Permalink | safeURL -}}"><strong>{{- $title -}}</strong></a>
{{ if $due }}<br>{{ printf "(%s)" $due }}{{ end }}
</li>
Expand Down

0 comments on commit 3f6781b

Please sign in to comment.