</div>
</div>
</section>
+
+ <section class="hero">
+ <div class="hero-body">
+ <div class="container">
+ <h4 class="title is-4">
+ <span class="icon-text">
+ <span>
+ {{ _("Recent News") }}
+ </span>
+
+ <span class="icon">
+ <a href="/blog/feed.xml" title="{{ _("RSS Feed") }}">
+ <i class="fas fa-rss"></i>
+ </a>
+ </span>
+ </span>
+ </h4>
+
+ {# List the most recent posts #}
+ {% for post in posts %}
+ <div class="block">
+ <h5 class="title is-5">
+ <a href="/blog/{{ post.slug }}">
+ {{ post.title }}
+ </a>
+ </h5>
+ <h6 class="subtitle is-6">
+ <small class="has-text-grey">
+ {{ locale.format_date(post.published_at, shorter=True) }}
+
+ {% if post.author %}
+ {{ _("by %s") % post.author }}
+ {% end %}
+ </small>
+ </h6>
+
+ <div class="content">
+ {{ post.excerpt }}
+ </div>
+ </div>
+ {% end %}
+
+ <a class="button is-text is-fullwidth" href="/blog">
+ {{ _("Read More On The IPFire Blog") }}
+ </a>
+ </div>
+ </div>
+ </section>
{% end block %}
# Get the latest release.
latest_release = self.releases.get_latest()
- return self.render("index.html", latest_release=latest_release)
+ # Fetch the latest blog posts
+ posts = self.backend.blog.get_newest(limit=2)
+
+ self.render("index.html", latest_release=latest_release, posts=posts)
class StaticHandler(base.AnalyticsMixin, base.BaseHandler):