msos/tools
popovskik 0d49293693 GEO: FAQPage/NGO/Event schema + autonomous generation for new projects
Generative Engine Optimization pass so AI answer engines (ChatGPT, Gemini,
Perplexity, AI Overviews) can confidently identify and cite MSOS.

Schema (tools/seo_inject.py, propagated to all 231 pages):
- FAQPage JSON-LD parsed from the /faq/ Q&A blocks (33 Q&A x EN/MK/SI)
- Organization upgraded to NGO with entity-disambiguation fields:
  alternateName (all spellings), description, areaServed Slovenia,
  knowsLanguage, and foundingDate 2023-03-05
- Event JSON-LD on all 9 /projects/ recap pages (date + real location)

Autonomous for future content (no code edits to add a project):
- Event/Article dates auto-read from the English page's publish date;
  event city auto-detected from the body (Slovenian-city whitelist).
  ARTICLE_DATES/PROJECT_LOCATIONS are now optional overrides only.
  (Auto-detect corrected Paint & Wine to Nova Gorica.)
- build_listings.py: auto-date fallback so undated new content still lists
- pre-commit hook now runs seo_inject.py --all --sitemap first, then
  listings/botlinks, and re-stages changed pages (idempotent)

Docs: docs/geo-offsite-worklist.md - copy-paste-ready off-site plan
(Wikidata, Wikipedia fixes, directories, Google Business, AI-visibility tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-07 22:17:03 +02:00
..
__pycache__ GEO: FAQPage/NGO/Event schema + autonomous generation for new projects 2026-08-07 22:17:03 +02:00
git-hooks GEO: FAQPage/NGO/Event schema + autonomous generation for new projects 2026-08-07 22:17:03 +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 personal essay "How I coped with leaving home" (trilingual, prose) 2026-08-05 17:37:14 +02:00
build_botlinks.py Bot pages: use root-relative links so they work on any host 2026-08-05 18:18:32 +02:00
build_listings.py GEO: FAQPage/NGO/Event schema + autonomous generation for new projects 2026-08-07 22:17:03 +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 GEO: FAQPage/NGO/Event schema + autonomous generation for new projects 2026-08-07 22:17:03 +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.