theme: adjust breadcrumb and title for empty home page titles #202

This commit is contained in:
Sören Weber 2022-02-24 23:09:49 +01:00
parent eab101eace
commit 12df32764f
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
3 changed files with 4 additions and 5 deletions

View file

@ -61,7 +61,7 @@ Example from the current website:
````toml
[Languages]
[Languages.en]
title = "Documentation for Hugo Relearn Theme"
title = "Hugo Relearn Theme"
weight = 1
languageName = "English"
landingPageURL = "/"
@ -95,7 +95,7 @@ Example from the current website:
weight = 40
[Languages.pir]
title = "Documentat'n fer Cap'n Hugo Relearrrn Theme"
title = "Cap'n Hugo Relearrrn Theme"
weight = 1
languageName = "Arrr! Pirrrates"
landingPageURL = "/pir/"

View file

@ -78,7 +78,6 @@
"warn'n" "warning"
"sect'n" "section"
"n Cap'n" "n"
"Documentat'n fer Cap'n Hugo Relearrrn Theme" "Documentation for Hugo Relearn Theme"
"Avast right o' John" "Note right of John"
-}}
{{- $c := "" }}

View file

@ -2,7 +2,7 @@
<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d">
<head>
{{- partial "meta.html" . }}
<title>{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }}</title>
<title>{{ if and .Title (not (eq .Title .Site.Title)) }}{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ end}}{{ .Site.Title }}</title>
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
{{- else }}
@ -120,6 +120,6 @@
{{- template "breadcrumb" dict "page" $parent "depth" $depth }}
{{- end }}
{{- if $ispublished }}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><meta itemprop="position" content="{{ $depth }}" /><a itemprop="item" href="{{ .page.RelPermalink }}"{{if not .depth}} aria-disabled="true"{{end}}><span itemprop="name">{{ .page.Title }}</span></a>{{ if .depth }} > {{ end }}</li>
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><meta itemprop="position" content="{{ $depth }}" /><a itemprop="item" href="{{ .page.RelPermalink }}"{{if not .depth}} aria-disabled="true"{{end}}><span itemprop="name">{{if .page.Title}}{{ .page.Title }}{{else}}{{ .page.Site.Title }}{{end}}</span></a>{{ if .depth }} > {{ end }}</li>
{{- end }}
{{- end }}