From 8cd0bb4e79cd1ce512e210663ad75b9bf8511c6e Mon Sep 17 00:00:00 2001 From: nanxiaobei Date: Sat, 25 Feb 2023 01:51:26 +0800 Subject: [PATCH] update seo --- layouts/_default/list.html | 6 +++--- layouts/_default/single.html | 6 ++++-- layouts/partials/head.html | 16 ++++++++++------ layouts/partials/header.html | 10 ++++------ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 99e2adc..a22dd7f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -28,7 +28,7 @@ {{ or site.Params.name site.Title }} {{ end }} @@ -36,8 +36,8 @@

{{ site.Params.name }}

- {{ site.Params.bio | default (print "Personal blog by " site.Params.name) - }} + {{ site.Params.bio | default (print `A personal blog by ` + site.Params.name) }}
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d0907af..16170a5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -9,9 +9,11 @@ {{ if .Date }} {{ end }} - {{ if or .Params.Author site.Author.name }} + {{ $single_author := or .Params.Author site.Author.name }} + + {{ if $single_author }} · - {{ .Params.Author | default site.Author.name }} + {{ $single_author }} {{ end }} {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 95beee2..83c3ad1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,15 +11,19 @@ + + {{ $site_author := or site.Author.name site.Params.name site.Title }} + {{ if eq .Kind "page" }} - + {{ else }} - - + + + {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a7e6b9c..5976af6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,16 +5,14 @@ href="{{ `/` | absURL }}" >{{ site.Title }} - Dark + > - + > {{ $bg_color := $.Scratch.Get "bg_color" }}