Skip to content

Commit b1611ac

Browse files
committed
make author links dynamic. creativecommons#62
1 parent ff6a20d commit b1611ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/blog-post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% block header %}{{ this.parent.title }}{% endblock %}
44
{% block body %}
55
<h2 class="mb-0">{{ this.title }}</h2>
6-
<p class="meta text-muted mt-0">by <a href="/blog/authors/{{ this.author }}">{{ this.author }}</a>
6+
<p class="meta text-muted mt-0">by <a href="{{ this.parent.parent.children.get('authors').path + '/' + this.author }}">{{ this.author }}</a>
77
on {{ this.pub_date|dateformat('EEEE, yyyy ''MMMM d') }}</p>
88
<div class="body">{{ this.body }}</div>
99
<div class="card bg-light">

templates/macros/posts.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% for post in posts %}
44
<li>
55
<a href="{{ post|url }}">{{ post.title }}</a>
6-
<p class="text-muted small">by <a href="/blog/authors/{{ post.author }}">{{ post.author }}</a>
6+
<p class="text-muted small">by <a href="{{ post.parent.parent.children.get('authors').path + '/' + post.author }}">{{ post.author }}</a>
77
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</p>
88
</li>
99
{% endfor %}

0 commit comments

Comments
 (0)