Skip to content

Commit

Permalink
theme: adjust breadcrumb and title for empty home page titles #202
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 24, 2022
1 parent eab101e commit 12df327
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exampleSite/content/cont/menushortcuts.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "/"
Expand Down Expand Up @@ -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/"
Expand Down
1 change: 0 additions & 1 deletion exampleSite/layouts/shortcodes/piratify.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 := "" }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -120,6 +120,6 @@ <h1>{{ if eq .Kind "term" }}{{ .Data.Singular | humanize }} {{ default "::" .Sit
{{- 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 }}

0 comments on commit 12df327

Please sign in to comment.