From 39511642e40170530b1bbec7b6fe6626f73db0a1 Mon Sep 17 00:00:00 2001 From: alexandrev-tibco Date: Mon, 13 Apr 2026 19:05:52 +0200 Subject: [PATCH] SEO: robots.txt with sitemap, related posts links, canonical tags, better CTR snippet --- frontend/index.html | 8 ++--- site/layouts/_default/baseof.html | 5 +++ site/layouts/_default/single.html | 1 + site/layouts/partials/related-posts.html | 12 +++++++ site/layouts/robots.txt | 4 +++ site/static/css/main.css | 43 ++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 site/layouts/partials/related-posts.html create mode 100644 site/layouts/robots.txt diff --git a/frontend/index.html b/frontend/index.html index d8080bba..d56b6894 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,19 +3,19 @@ - XSLT Playground - Free Online XSLT Editor, Tester & Validator + XSLT Playground — Free Online XSLT Tester & Editor - + diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html index 28240b65..7f95c71a 100644 --- a/site/layouts/_default/baseof.html +++ b/site/layouts/_default/baseof.html @@ -5,6 +5,11 @@ {{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }} + + + + + {{ partial "adsense/head.html" . }} diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html index 56b474ca..b60c3dea 100644 --- a/site/layouts/_default/single.html +++ b/site/layouts/_default/single.html @@ -9,5 +9,6 @@ {{ .Content }} + {{ partial "related-posts.html" . }} {{ end }} diff --git a/site/layouts/partials/related-posts.html b/site/layouts/partials/related-posts.html new file mode 100644 index 00000000..515b09d8 --- /dev/null +++ b/site/layouts/partials/related-posts.html @@ -0,0 +1,12 @@ +{{- $related := first 4 (where (where .Site.RegularPages "Section" "posts") "Permalink" "ne" .Permalink) -}} +{{- if $related -}} + +{{- end -}} diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt new file mode 100644 index 00000000..e10def0c --- /dev/null +++ b/site/layouts/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: + +Sitemap: {{ .Site.BaseURL }}sitemap.xml diff --git a/site/static/css/main.css b/site/static/css/main.css index 9b6efce3..96c19a26 100644 --- a/site/static/css/main.css +++ b/site/static/css/main.css @@ -254,6 +254,49 @@ code { border-radius: 6px; } +.related-posts { + margin-top: 3rem; + padding: 1.5rem; + border: 1px solid var(--border); + border-radius: 8px; + background: rgba(255,255,255,0.03); +} + +.related-posts h3 { + margin: 0 0 0.75rem; + font-size: 1rem; + color: var(--accent); +} + +.related-posts ul { + list-style: none; + padding: 0; + margin: 0 0 1rem; + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.related-posts ul a { + color: var(--text); + text-decoration: none; +} + +.related-posts ul a:hover { + color: var(--accent); + text-decoration: underline; +} + +.related-cta { + margin: 0; + font-size: 0.85rem; + color: var(--muted); +} + +.related-cta a { + color: var(--accent); +} + @media (max-width: 720px) { .header-grid { grid-template-columns: 1fr; } .nav { flex-wrap: wrap; }