fbd4e92e9f
Full rewrite: swap out the v1 framework (src/, controllers/, views/, twig/, sass/, skeleton/) for the working v2 codebase from phpproject (App/, novaconium/, public/).
31 lines
1.4 KiB
Twig
31 lines
1.4 KiB
Twig
{% extends layout %}
|
|
|
|
{% block title %}Blog{% endblock %}
|
|
{% block description %}All posts on this blog — a working example of a sidecar-driven listing page.{% endblock %}
|
|
|
|
{% block robots %}index, follow{% endblock %}
|
|
{% block canonical %}{{ request_path|default('/') }}{% endblock %}
|
|
|
|
{% block og_type %}website{% endblock %}
|
|
{% block og_title %}{{ block('title') }}{% endblock %}
|
|
{% block og_description %}{{ block('description') }}{% endblock %}
|
|
{% block og_url %}{{ block('canonical') }}{% endblock %}
|
|
|
|
{% block twitter_card %}summary{% endblock %}
|
|
{% block twitter_title %}{{ block('title') }}{% endblock %}
|
|
{% block twitter_description %}{{ block('description') }}{% endblock %}
|
|
|
|
{% block blog_content %}
|
|
<h1>Blog</h1>
|
|
<p>Rendered by <code>App/pages/blog/index.php</code> and <code>index.twig</code> — a sidecar that returns a hand-maintained array pointing at each post directory under <code>App/pages/blog/</code>. Because this page has a sidecar, it's never served from the static cache; the list is rebuilt on every request, even though the array itself only changes when a post is added.</p>
|
|
|
|
<ul class="post-list">
|
|
{% for post in posts %}
|
|
<li>
|
|
<h2><a href="/blog/{{ post.slug }}">{{ post.title }}</a></h2>
|
|
<p>{{ post.excerpt }}…</p>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock %}
|