added meta data to page template
This commit is contained in:
parent
06787aac30
commit
f3dfd3411a
2 changed files with 11 additions and 2 deletions
|
@ -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…
Reference in a new issue