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>Што е ново кај МСОС, од настани и проекти до блог приказни и објави.</p>
</div>
<div class="news-articles">
<!-- AUTO-LATEST-NEWS:START (generated from mk/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="../mk/news/proof-of-means-updated-2026/">
<img width="1600" height="1067" src="../images/news-proof-of-means.webp" alt="Износот за доказ за средства ажуриран на 507,43 € месечно" loading="lazy">
<span class="news-badge news-badge--news"><i class="fas fa-bullhorn" aria-hidden="true"></i> Вест</span>
<!-- AUTO-LATEST-NEWS:START -->
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/mk/blog/welcome-days-slovenian-universities-2026-2027/">
<img width="1600" height="1067" src="/images/event4-img-1.webp" alt="Нови студенти на ден за добредојде на универзитет во Словенија" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Блог</span>
</a>
<div class="card-content">
<p class="author">1 август 2026</p>
<h3><a href="../mk/news/proof-of-means-updated-2026/">Износот за доказ за средства ажуриран на 507,43 € месечно</a></h3>
<p class="author">3 август 2026</p>
<h3><a href="/mk/blog/welcome-days-slovenian-universities-2026-2027/">Денови за добредојде за додипломски, магистерски и Erasmus студенти во Словенија</a></h3>
</div>
</article>
<article class="news-card" data-type="news">
<a class="news-card-media" href="../mk/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> Вест</span>
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/mk/blog/where-to-search-for-accommodation-in-slovenia/">
<img width="1600" height="1067" src="/images/event4-image2.webp" alt="Македонски студенти се вселуваат во сместување во Словенија" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Блог</span>
</a>
<div class="card-content">
<p class="author">15 јули 2026</p>
<h3><a href="../mk/news/">Пријавите за академската 2026/2027 година се отворени</a></h3>
<p class="author">3 август 2026</p>
<h3><a href="/mk/blog/where-to-search-for-accommodation-in-slovenia/">Каде да барате студентско сместување во Словенија</a></h3>
</div>
</article>
<article class="news-card" data-type="news">
<a class="news-card-media" href="../mk/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> Вест</span>
<article class="news-card" data-type="blog">
<a class="news-card-media" href="/mk/blog/ad-futura-scholarship-slovenia-2026/">
<img width="1600" height="1067" src="/images/event4-image2.webp" alt="Македонски студенти заедно во Словенија" loading="lazy">
<span class="news-badge news-badge--blog"><i class="fas fa-pen-nib" aria-hidden="true"></i> Блог</span>
</a>
<div class="card-content">
<p class="author">5 јули 2026</p>
<h3><a href="../mk/news/">Придружи се на неделата на добредојде за нови студенти</a></h3>
<p class="author">2 август 2026</p>
<h3><a href="/mk/blog/ad-futura-scholarship-slovenia-2026/">Студирајте во Словенија со стипендијата Ad futura: Водич за студенти од Западен Балкан во 2026 година</a></h3>
</div>
</article>
<!-- AUTO-LATEST-NEWS:END -->
<!-- AUTO-LATEST-NEWS:END -->
</div>
<a href="../mk/news/" class="btn btn-secondary">Види ги сите</a>
</section>