forked from projects/fipamo
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) {
|
foreach ($taglist as $tag) {
|
||||||
$label = trim($tag);
|
$label = trim($tag);
|
||||||
array_push($tags, [
|
array_push($tags, [
|
||||||
"tag_name" => $label,
|
"label" => $label . " ",
|
||||||
"slug" => StringTools::safeString($label),
|
"slug" => StringTools::safeString($label),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$meta = [
|
$meta = [
|
||||||
"who" => $page["author"],
|
"who" => $page["author"],
|
||||||
"when" => $page["updated"],
|
"when" => $page["created"],
|
||||||
"tags" => $tags,
|
"tags" => $tags,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,14 @@
|
||||||
<article>
|
<article>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<p>{{content | raw}}</p>
|
<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>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in a new issue