Interconnect News hub + homepage with Blog & Projects (real sync)

Rewrite tools/build_listings.py to treat the Blog, Projects and News detail
pages as the single source of truth. It now regenerates:
  - the News hub grid (all items, newest first, correct dates from ARTICLE_DATES)
  - the homepage "Latest news" block (top 3)
both marker-wrapped. Previously the News hub was hand-maintained with drifted,
hardcoded dates and only some blog posts; now adding a blog/event and running
the script flows through to News and the homepage automatically.

Card links/images are root-relative so they work on any host.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
popovskikandClaude Opus 4.8 committed 2026-08-05 18:27:40 +02:00
1 parent e12724bbd1
commit cf3fce2522
7 files changed
+729 -576

No files matched your search

+20 -20
View File
@@ -310,38 +310,38 @@
<p>Kaj je novega pri MSOS, od dogodkov in projektov do blog zgodb in obvestil.</p>
</div>
<div class="news-articles">
<!-- AUTO-LATEST-NEWS:START (generated from si/news/ by tools/build_listings.py — edit the News page, not here) -->
<article class="news-card" data-type="news">
<a class="news-card-media" href="../si/news/proof-of-means-updated-2026/">
<img width="1600" height="1067" src="../images/news-proof-of-means.webp" alt="Znesek dokazila o sredstvih posodobljen na 507,43 € na mesec" loading="lazy">
<span class="news-badge news-badge--news"><i class="fas fa-bullhorn" aria-hidden="true"></i> Novica</span>
<!-- AUTO-LATEST-NEWS:START -->
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/si/blog/welcome-days-slovenian-universities-2026-2027/">
<img width="1600" height="1067" src="/images/event4-img-1.webp" alt="Novi študenti na uvajalnem dnevu univerze v Sloveniji" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Blog</span>
</a>
<div class="card-content">
<p class="author">1 avgust 2026</p>
<h3><a href="../si/news/proof-of-means-updated-2026/">Znesek dokazila o sredstvih posodobljen na 507,43 € na mesec</a></h3>
<p class="author">3. avgust 2026</p>
<h3><a href="/si/blog/welcome-days-slovenian-universities-2026-2027/">Uvajalni dnevi za dodiplomske, magistrske in Erasmus študente v Sloveniji</a></h3>
</div>
</article>
<article class="news-card" data-type="news">
<a class="news-card-media" href="../si/news/">
<div class="news-ph"><i class="fas fa-bullhorn" aria-hidden="true"></i></div>
<span class="news-badge news-badge--news"><i class="fas fa-bullhorn" aria-hidden="true"></i> Novica</span>
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/si/blog/where-to-search-for-accommodation-in-slovenia/">
<img width="1600" height="1067" src="/images/event4-image2.webp" alt="Makedonski študenti se vseljujejo v nastanitev v Sloveniji" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Blog</span>
</a>
<div class="card-content">
<p class="author">15 julij 2026</p>
<h3><a href="../si/news/">Prijave za študijsko leto 2026/2027 so odprte</a></h3>
<p class="author">3. avgust 2026</p>
<h3><a href="/si/blog/where-to-search-for-accommodation-in-slovenia/">Kje iskati študentsko nastanitev v Sloveniji</a></h3>
</div>
</article>
<article class="news-card" data-type="news">
<a class="news-card-media" href="../si/news/">
<div class="news-ph"><i class="fas fa-bullhorn" aria-hidden="true"></i></div>
<span class="news-badge news-badge--news"><i class="fas fa-bullhorn" aria-hidden="true"></i> Novica</span>
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/si/blog/ad-futura-scholarship-slovenia-2026/">
<img width="1600" height="1067" src="/images/event4-image2.webp" alt="Makedonski študenti skupaj v Sloveniji" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Blog</span>
</a>
<div class="card-content">
<p class="author">5 julij 2026</p>
<h3><a href="../si/news/">Pridruži se tednu dobrodošlice za nove študente</a></h3>
<p class="author">2. avgust 2026</p>
<h3><a href="/si/blog/ad-futura-scholarship-slovenia-2026/">Študij v Sloveniji s štipendijo Ad futura: Vodnik za študente z Zahodnega Balkana v letu 2026</a></h3>
</div>
</article>
<!-- AUTO-LATEST-NEWS:END -->
<!-- AUTO-LATEST-NEWS:END -->
</div>
<a href="../si/news/" class="btn btn-secondary">Poglej vse</a>
</section>