added meta data to page template

This commit is contained in:
Ro 2021-04-26 13:19:47 -07:00
parent 06787aac30
commit f3dfd3411a
2 changed files with 11 additions and 2 deletions

View file

@ -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,
];

View file

@ -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 %}