Skip to content

Commit 4358682

Browse files
googol42kmindi
authored andcommitted
Feature: first draft to display meta data (#20)
* Feature: first draft to display meta data * Fix: remove emtpy lines * Refactor: move sections to the bottom * Feature: display reviews and authors separately * Feature: display last updated time * Fix: correct spelling of reviews * Fix: correct html formatting
1 parent 31160d9 commit 4358682

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

_layouts/page.html

+34
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,40 @@ <h1 class="post-title-main">{{ page.title }}</h1>
5656

5757
{{content}}
5858

59+
{% if page %}
60+
<!-- copy value from front matter to site namespace -->
61+
{% assign site.last_updated = page.last_updated %}
62+
{% if page.references %}
63+
<h3>References</h3>
64+
<ul>
65+
{% for reference in page.references %}
66+
<li><a href={{ reference.url }} target=_blank>{{ reference.description }} </a></li>
67+
{% endfor %}
68+
</ul>
69+
{% endif %}
70+
71+
{% if page.authors %}
72+
<h3>Authors</h3>
73+
{% assign first = true %}
74+
{% for author in page.authors %}
75+
{% unless first %}
76+
{{","}}
77+
{% endunless %}
78+
<a href={{ author.url }} target=_blank>{{ author.name }}</a>
79+
{% assign first = false %}
80+
{% endfor %}
81+
{% endif %}
82+
83+
{% if page.current_reviews %}
84+
<h3>Reviews</h3>
85+
<ul>
86+
{% for reviewer in page.current_reviews %}
87+
<li><a href={{ reviewer.url }} target=_blank>{{ reviewer.name }}</a> (<a href={{ reviewer.reviewed_commit }})>see commit</a>)</li>
88+
{% endfor %}
89+
</ul>
90+
{% endif %}
91+
{% endif %}
92+
5993
<div class="tags">
6094
{% if page.tags != null %}
6195
<b>Tags: </b>

0 commit comments

Comments
 (0)