added meta data to page template

beta
Ro 4 years ago
parent 06787aac30
commit f3dfd3411a

@ -55,13 +55,14 @@ class Render
foreach ($taglist as $tag) {
$label = trim($tag);
array_push($tags, [
"tag_name" => $label,
"label" => $label . " ",
"slug" => StringTools::safeString($label),
]);
}
$meta = [
"who" => $page["author"],
"when" => $page["updated"],
"when" => $page["created"],
"tags" => $tags,
];

@ -13,6 +13,14 @@
<article>
<div class="page">
<p>{{content | raw}}</p>
<div>
{{meta['who']}} dropped this {{ meta['when'] }}<br />
<strong>tags: </strong>
{% for tag in meta['tags'] %}
<a href="{{ "/tags/"~tag.slug~".html" }}">{{ tag.label }}</a>
{% endfor %}
</div>
</div>
</article>
{% endblock %}
Loading…
Cancel
Save