msos/tools
popovskik 9d53216b08 Blog: add markdown->page converter + new post "Where to search for accommodation" (EN)
tools/build_blog.py converts a Markdown source into the site's scrollspy blog
article (title, header, hero, sidebar nav from ## headings, body). First output:
the new EN post "Where to search for student accommodation in Slovenia", added at
the top of the blog index (newest first), dated 2026-08-03, SEO injected.

MK/SI of this post and the rest of the blog batch (refresh 1-5, split trilingual
posts 2-4, personal essay post 7) still to come.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-05 17:09:09 +02:00
..
README.md Add technical SEO foundation, MK/SI about-us + timeline, content fixes 2026-08-02 11:43:10 +02:00
build_blog.py Blog: add markdown->page converter + new post "Where to search for accommodation" (EN) 2026-08-05 17:09:09 +02:00
build_botlinks.py changes.txt #2: AI/crawler discovery files (llms.txt + links-for-bots) 2026-08-05 16:10:38 +02:00
build_listings.py changes.txt #6: sync homepage "Latest news" from the News hub 2026-08-05 16:20:55 +02:00
build_search_index.py feat(assistant): v2 — query-language detection, analytics, chips, auto-index 2026-08-04 01:48:39 +02:00
seo_inject.py Blog: add markdown->page converter + new post "Where to search for accommodation" (EN) 2026-08-05 17:09:09 +02:00

README.md

tools/

seo_inject.py

Injects a technical-SEO block into every language page (en|mk|si/**/index.html) and regenerates sitemap.xml + robots.txt. Safe to re-run — the block lives between <!-- SEO:START --> and <!-- SEO:END --> and is replaced in place.

The block adds: meta description (auto-extracted from the page's lead/subtitle where available), canonical, hreflang alternates (en / mk / sl / x-default), Open Graph, Twitter Card, and an Organization JSON-LD.

All absolute URLs point at the final domain https://msosorg.com (not the temporary host), so nothing needs rewriting at launch. Note: the Slovene folder is /si/ but the ISO code is sl — the script maps si → sl for hreflang/locale.

Usage

python tools/seo_inject.py            # dry run: print the block for pilot pages
python tools/seo_inject.py --all      # write the block into every page
python tools/seo_inject.py --all --sitemap   # also rebuild sitemap.xml + robots.txt

Run --all --sitemap after adding, renaming, or deleting any page so canonical tags, hreflang alternates, and the sitemap stay in sync.