From da9ad98b6ada85c3fc1694fef24239afdd6f2310 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 7 Mar 2022 01:44:15 -0500 Subject: [PATCH] Layout cleanup in preparation of title format change (#691) --- layouts/_default/baseof.html | 4 ++-- layouts/_default/single.html | 4 ---- layouts/blog/list.html | 12 ++++-------- layouts/docs/list.html | 10 +++------- layouts/docs/single.html | 10 +++------- layouts/index.html | 4 ++-- layouts/partials/home/hero.html | 3 +-- layouts/partials/navbar.html | 1 - 8 files changed, 15 insertions(+), 33 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 329c0cd1d..47a194084 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,8 +4,8 @@ {{ partial "meta.html" . }} - {{ block "title" . }} - {{ site.Title }} + {{ block "title" . -}} + {{ site.Title }} | {{ .Title -}} {{ end }} {{ partial "css.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1ae51c33e..7d900601b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,3 @@ -{{ define "title" }} -{{ site.Title }} | {{ .Title }} -{{ end }} - {{ define "main" }} {{ partial "hero.html" . }} {{ partial "content.html" . }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html index ab73e816e..fc63a4895 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -1,8 +1,4 @@ -{{ define "title" }} -{{ site.Title }} | {{ .Title }} -{{ end }} - -{{ define "main" }} -{{ partial "blog/list-hero.html" . }} -{{ partial "blog/posts.html" . }} -{{ end }} \ No newline at end of file +{{ define "main" -}} + {{ partial "blog/list-hero.html" . }} + {{ partial "blog/posts.html" . }} +{{ end -}} diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 4f2b1451c..0261627c0 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -1,7 +1,3 @@ -{{ define "title" }} -{{ site.Title }} | {{ .Title }} -{{ end }} - -{{ define "main" }} -{{ partial "article.html" . }} -{{ end }} \ No newline at end of file +{{ define "main" -}} + {{ partial "article.html" . }} +{{ end -}} diff --git a/layouts/docs/single.html b/layouts/docs/single.html index 4f2b1451c..0261627c0 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1,7 +1,3 @@ -{{ define "title" }} -{{ site.Title }} | {{ .Title }} -{{ end }} - -{{ define "main" }} -{{ partial "article.html" . }} -{{ end }} \ No newline at end of file +{{ define "main" -}} + {{ partial "article.html" . }} +{{ end -}} diff --git a/layouts/index.html b/layouts/index.html index f8bf12095..b58795fb2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,4 @@ -{{ define "title" }} +{{ define "title" -}} {{ site.Title }} | {{ site.Params.tagline }} {{ end }} @@ -17,4 +17,4 @@ {{ partial "home/get-involved.html" . }} {{ partial "home/cncf.html" . }} -{{ end }} +{{ end -}} diff --git a/layouts/partials/home/hero.html b/layouts/partials/home/hero.html index d8d1ed0b0..e353cc0b3 100644 --- a/layouts/partials/home/hero.html +++ b/layouts/partials/home/hero.html @@ -1,5 +1,4 @@ {{ $logo := printf "img/logos/%s" site.Params.logos.hero | relURL }} -{{ $title := site.Title }} {{ $desc := site.Params.description | markdownify }} {{ $btns := site.Menus.buttons }} {{ $sect := .Section }} @@ -9,7 +8,7 @@
- +
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 4459d6a95..686eedea0 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,6 +1,5 @@ {{ $home := site.BaseURL }} {{ $here := .RelPermalink }} -{{ $title := site.Title }} {{ $logo := site.Params.logos.navbar }} {{ $menu := site.Menus.main }} {{ $docs := site.Menus.docs }}