Tags, rss, sitemap and robots.txt

This commit is contained in:
Hazem Krimi
2023-11-17 18:49:54 +01:00
parent 5ea292e909
commit 4598a12887
11 changed files with 92 additions and 15 deletions
+27 -4
View File
@@ -9,11 +9,34 @@
{{ .Content }}
<section>
{{ range .Paginator.Pages }}
{{ partial "card.html" . }}
{{ if or (.InSection ($.Site.GetPage "blog")) (findRESubmatch "tags" .RelPermalink) }}
{{ $currentTitle := .Page.Title }}
{{ if (findRESubmatch "tags" .RelPermalink) }}
<h2>Blog</h2>
<p>These are articles about things I learned about software engineering.</p>
{{ end }}
</section>
<section id="tags">
{{ range .Site.Taxonomies.tags }}
<a class="{{ if (eq $currentTitle .Page.Title) }}selected{{ end }}"
href="{{ .Page.Permalink }}"
>
{{ .Page.Title }}
</a>
{{ end }}
</section>
{{ end }}
{{ if gt .Paginator.TotalPages 0 }}
<section>
{{ range .Paginator.Pages }}
{{ partial "card.html" . }}
{{ end }}
</section>
{{ else }}
<h2>Nothing for now</h2>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}