Filter future-dated posts out of blog/homepage listings and add a daily 05:05 UTC rebuild so posts go live on their date automatically. New interactive post on BJT amplification with five canvas scenes (valve, load line, transfer curve, amplifier in action, gain). Shared scene.css for future interactive posts. Post is dated 2026-04-23 and will appear in listings once the date arrives. Also drop IDEAS.md with candidate topics for future posts.
71 lines
2.1 KiB
HTML
71 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ config.title }}{% endblock title %}
|
|
|
|
{% block content %}
|
|
<section>
|
|
{% if section.title %}
|
|
<h1>{{ section.title }}</h1>
|
|
{% endif %}
|
|
<div>
|
|
{{ section.content | safe }}
|
|
</div>
|
|
</section>
|
|
|
|
{% set projects_section = get_section(path="projects/_index.md") %}
|
|
{% if projects_section.pages | length > 0 %}
|
|
<h2>Projects</h2>
|
|
<ul>
|
|
{% for page in projects_section.pages %}
|
|
<li>
|
|
<a href="{{ page.extra.url }}">{{ page.title }}</a> — {{ page.description }}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% 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). #}
|
|
{% 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 %}
|
|
{% set page_ts = page.date | date(format="%s") | int %}
|
|
{% if page_ts <= current_ts %}
|
|
{% set_global published_pages = published_pages | concat(with=page) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if published_pages | length > 0 %}
|
|
<h2>Blog</h2>
|
|
{% set latest = published_pages | first %}
|
|
<article>
|
|
<h2><a href="{{ latest.permalink }}">{{ latest.title }}</a></h2>
|
|
{% if latest.date %}
|
|
<p><time datetime="{{ latest.date | date(format="%Y-%m-%d") }}">{{ latest.date | date(format="%Y-%m-%d") }}</time></p>
|
|
{% endif %}
|
|
{% if latest.summary %}
|
|
{{ latest.summary | safe }}
|
|
{% else %}
|
|
<p>{{ latest.content | striptags | truncate(length=400) }}</p>
|
|
{% endif %}
|
|
<p><a href="{{ latest.permalink }}">Read more →</a></p>
|
|
</article>
|
|
|
|
{% if published_pages | length > 1 %}
|
|
<h2>Recent Posts</h2>
|
|
<ul>
|
|
{% for page in published_pages | slice(start=1, end=6) %}
|
|
<li>
|
|
{% if page.date %}
|
|
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}">{{ page.date | date(format="%Y-%m-%d") }}</time>
|
|
{% endif %}
|
|
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<p><a href="{{ get_url(path='@/blog/_index.md') }}">All posts →</a></p>
|
|
{% endif %}
|
|
{% endblock content %}
|