diff --git a/templates/blog/list.html b/templates/blog/list.html index 3cf986c..996f9b0 100644 --- a/templates/blog/list.html +++ b/templates/blog/list.html @@ -60,7 +60,7 @@

Starting Points

{% endfor %} -
Years
+
Index by year
{% for year_section in archive_list.subsections | sort | reverse %} {% set year = get_section(path=year_section, metadata_only=true) %} diff --git a/templates/section.html b/templates/section.html index 8e4ed84..7e217a1 100644 --- a/templates/section.html +++ b/templates/section.html @@ -3,6 +3,10 @@ {% block template_vars %} {{super()}} {% set page_title = macros::section_path_title(node=node) %} + + {% if section.path is starting_with("/blog/") %} + {% set page_title = "Index: " ~ page_title %} + {% endif %} {% endblock template_vars %} {% block page_content %} @@ -10,6 +14,19 @@ {% set sort_attribute = "title" %} {% if section.path is starting_with("/blog/") %} {% set sort_attribute = "date" %} + + {%- set is_blog_year_index = node.components | length == 2 -%} + {%- if is_blog_year_index %} +
+
Index by month
+
+ {% for month_section in node.subsections | sort %} + {% set month = get_section(path=month_section) %} + {{ month.components[1] ~ "-" ~ month.components[2] ~ "-01" | date(format="%B") }} + {% endfor %} +
+
+ {%- endif -%} {% endif %} {{ macros::collection_list(collection=node.pages | sort(attribute=sort_attribute)) }}