1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-18 19:43:16 +00:00

SEO: robots.txt with sitemap, related posts links, canonical tags, better CTR snippet

This commit is contained in:
alexandrev-tibco
2026-04-13 19:05:52 +02:00
parent d850207ba9
commit 39511642e4
6 changed files with 69 additions and 4 deletions
+12
View File
@@ -0,0 +1,12 @@
{{- $related := first 4 (where (where .Site.RegularPages "Section" "posts") "Permalink" "ne" .Permalink) -}}
{{- if $related -}}
<aside class="related-posts">
<h3>Related articles</h3>
<ul>
{{- range $related }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end }}
</ul>
<p class="related-cta">Try the examples in <a href="https://xsltplayground.com">XSLT Playground</a> — free online XSLT editor and tester.</p>
</aside>
{{- end -}}