seo improvement with titles h1/h4

This commit is contained in:
kbe
2025-08-19 17:17:09 +02:00
parent 851547b87d
commit ef6876a0d3
9 changed files with 88 additions and 103 deletions

View File

@@ -1,10 +1,11 @@
{{ define "main" }}
{{ $defaultCategory := "General" }}
{{ if .Site.Params.defaultCategory }}{{ $defaultCategory = .Site.Params.defaultCategory }}{{ end }}
<!-- layouts/index.html -->
<div class="section-sm bg-gray-lighter">
<div class="container text-center">
<h3 class="font-family-playfair">{{ .Site.Title }} blog.</h3>
</div><!-- end container -->
<div class="container text-center">
<h1 class="font-family-playfair">{{ .Site.Title }}</h1>
<p class="mt-3">{{ .Site.Params.seo.description }}</p>
</div><!-- end container -->
</div>
<!-- Blog section -->
@@ -27,31 +28,14 @@
</div>
<div class="mt-4">
<div class="d-flex justify-content-between mb-2">
<div class="d-inline-flex">
{{ if .Params.categories }}
{{ range $index, $category := .Params.categories }}
{{ if $index }}, {{ end }}
{{ if and (eq (printf "%T" $category) "string") }}
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category | urlize }}">{{ $category }}</a>
{{ else if and (eq (printf "%T" $category) "map") }}
{{ if $category.name }}
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category.name | urlize }}">{{ $category.name }}</a>
{{ else }}
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
{{ end }}
{{ else }}
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
{{ end }}
{{ end }}
{{ else }}
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
{{ end }}
</div>
<!-- Display category -->
{{ partial "categories-first.html" . }}
<div class="d-inline-flex">
<span class="font-small">{{ .Date.Format "02/07/2006" }}</span>
</div>
</div>
<h4><a class="text-link-1" href="{{ .Permalink }}">{{ .Title }}</a></h4>
<h2><a class="text-link-1" href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ if .Params.excerpt }}
<p>{{ .Params.excerpt }}</p>
{{ else if .Summary }}
@@ -74,4 +58,4 @@
</div><!-- end container -->
</div>
<!-- end Blog section -->
{{ end }}
{{ end }}