File tree Expand file tree Collapse file tree 6 files changed +9
-25
lines changed
content/archives/old-tech-blog/categories Expand file tree Collapse file tree 6 files changed +9
-25
lines changed Original file line number Diff line number Diff line change 11_ model: blog-categories
22---
3- title: Blog Categories : CC Technical Blog (2007-2014)
3+ title: Archive : CC Technical Blog (2007-2014)
Original file line number Diff line number Diff line change @@ -20,5 +20,3 @@ order_by = -pub_date, title
2020[pagination]
2121enabled = yes
2222per_page = 10
23-
24-
Original file line number Diff line number Diff line change 33{% block title %}{{ this.name }}{% endblock %}
44{% block header %}Archive: CC Technical Blog (2007-2014){% endblock %}
55{% block body %}
6- < h2 > Blog Posts by {{ this.name }}</ h2 >
6+ < h2 > Posts by {{ this.name }}</ h2 >
77 {{ render_blog_list(this.children) }}
88 < hr >
99 < strong > < a href ="/blog/authors "> All Authors</ a > </ strong >
Original file line number Diff line number Diff line change 11{% extends "layout.html" %}
2- {% from "macros/categories .html" import render_category_list %}
2+ {% from "macros/posts .html" import render_posts %}
33{% block title %}{{ this.parent.title }} - {{ this.name }}{% endblock %}
44{% block header %}{{ this.parent.title }}{% endblock %}
55{% block body %}
6- < h1 > Category: {{ this.name }}</ h1 >
7- {{ render_category_list (this.children) }}
6+ < h2 > All posts tagged " {{ this.name }}" </ h2 >
7+ {{ render_posts (this.children) }}
88 < hr >
99 < strong > < a href ="{{ this.parent.path }} "> All Categories</ a > </ strong >
1010{% endblock %}
Original file line number Diff line number Diff line change 11{% extends "layout.html" %}
22{% from "macros/pagination.html" import render_pagination %}
3+ {% from "macros/posts.html" import render_posts %}
34{% block title %}{{ this.title }}{% endblock %}
45{% block body %}
56 {{ this.description }}
6- < ul class ="blog-index list-unstyled ">
7- {% for post in this.pagination.items %}
8- < li >
9- < a href ="{{ post|url }} "> {{ post.title }}</ a >
10- < p class ="text-muted small "> by < a href ="/blog/authors/{{ post.author }} "> {{ post.author }}</ a >
11- on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</ p >
12- </ li >
13- {% endfor %}
14- </ ul >
15-
7+ {{ render_posts(this.pagination.items) }}
168 {% if this.pagination.pages > 1 %}
179 {{ render_pagination(this.pagination) }}
1810 {% endif %}
Original file line number Diff line number Diff line change 1+ {% from "macros/posts.html" import render_posts %}
2+
13{% macro render_categories(categories) %}
24< ul >
35 {% for category in site.query(categories.path) %}
46 < li > < a href ="{{ category|url }} "> {{ category.name }}</ a > </ li >
57 {% endfor %}
68</ ul >
79{% endmacro %}
8-
9- {% macro render_category_list(categories) %}
10- < ul >
11- {% for category in categories %}
12- < li > < a href ="{{ category|url }} "> {{ category.title }}</ a > </ li >
13- {% endfor %}
14- </ ul >
15- {% endmacro %}
You can’t perform that action at this time.
0 commit comments