File tree 3 files changed +33
-0
lines changed
3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% extends "layout.html" %}
2
+ {% from "macros/authors.html" import render_blog_list %}
3
+ {% block title %}{{ this.name }}{% endblock %}
4
+ {% block header %}CC Technical Blog Archives{% endblock %}
5
+ {% block body %}
6
+ < h2 > Blog Posts by {{ this.name }}</ h2 >
7
+ {{ render_blog_list(this.children) }}
8
+ < hr >
9
+ < strong > < a href ="/blog/authors "> All Authors</ a > </ strong >
10
+ {% endblock %}
Original file line number Diff line number Diff line change
1
+ {% extends "layout.html" %}
2
+ {% from "macros/authors.html" import render_authors %}
3
+ {% block title %}Authors{% endblock %}
4
+ {% block header %}CC Technical Blog Archives{% endblock %}
5
+ {% block body %}
6
+ < h1 > Authors</ h1 >
7
+ {{ render_authors() }}
8
+ {% endblock %}
Original file line number Diff line number Diff line change
1
+ {% macro render_authors() %}
2
+ < ul >
3
+ {% for author in site.query('/authors') %}
4
+ < li > < a href ="{{ author|url }} "> {{ author.name }}</ a > </ li >
5
+ {% endfor %}
6
+ </ ul >
7
+ {% endmacro %}
8
+
9
+ {% macro render_blog_list(blogs) %}
10
+ < ul >
11
+ {% for blog in blogs %}
12
+ < li > < a href ="{{ blog|url }} "> {{ blog.title }}</ a > </ li >
13
+ {% endfor %}
14
+ </ ul >
15
+ {% endmacro %}
You can’t perform that action at this time.
0 commit comments