{% extends "base.html" %} {% block title %}{{ config.title }}{% endblock title %} {% block content %}
{% if section.title %}

{{ section.title }}

{% endif %}
{{ section.content | safe }}
{% set projects_section = get_section(path="projects/_index.md") %} {% if projects_section.pages | length > 0 %}

Projects

{% endif %} {# Filter out future-dated posts so they appear automatically on their publish date (combined with a daily scheduled build in .forgejo/workflows/deploy.yml). Local `zola serve` swaps the base_url to 127.0.0.1; when that's the case we skip the filter and show every post so scheduled drafts are previewable. #} {% set is_local = "127.0.0.1" in config.base_url or "localhost" in config.base_url %} {% set current_ts = now(timestamp=true) %} {% set_global published_pages = [] %} {% set blog_section = get_section(path="blog/_index.md") %} {% for page in blog_section.pages %} {% if is_local %} {% set_global published_pages = published_pages | concat(with=page) %} {% else %} {% set page_ts = page.date | date(format="%s") | int %} {% if page_ts <= current_ts %} {% set_global published_pages = published_pages | concat(with=page) %} {% endif %} {% endif %} {% endfor %} {% if published_pages | length > 0 %}

Blog

{% set latest = published_pages | first %}

{{ latest.title }}

{% if latest.date %}

{% endif %} {% if latest.summary %} {{ latest.summary | safe }} {% else %}

{{ latest.content | striptags | truncate(length=400) }}

{% endif %}

Read more →

{% if published_pages | length > 1 %}

Recent Posts

{% endif %}

All posts →

{% endif %} {% endblock content %}