Skip to content
Permalink
Browse files
Make posts category info separate, archive more automatic.
  • Loading branch information
petrroll committed Jul 10, 2020
1 parent f87e1bb commit 6e19339a9ca9dc09c6ed5fdfac0a136181597fe6
Showing 5 changed files with 19 additions and 12 deletions.
@@ -66,3 +66,5 @@ exclude:
- README.md
- CNAME

collections:
- posts_category_info
@@ -1,13 +1,14 @@
{% comment %} Assumes `category_info` variable containing `.name` and `.description`. {% endcomment %}
<div class="archive-group">
<div id="#{{ category_name | slugize }}"></div>
<div id="#{{ category_info.name | slugize }}"></div>
<p></p>
<h2 class="category-head">{{ category_name | capitalize }}</h2>
<a name="{{ category_name | slugize }}"></a>
{{category_desc}}
<h2 class="category-head">{{ category_info.name | capitalize }}</h2>
<a name="{{ category_info.name | slugize }}"></a>
{{category_info.description}}
{% capture curr_date %}first-entry{% endcapture %}
<div class="group-year">
<ul>
{% for post in site.categories[category_name] %}
{% for post in site.categories[category_info.name] %}
{% capture post_date %}{{ post.date | date: "%b, %Y" }}{% endcapture %}
{% unless curr_date == post_date %}
{% unless curr_date == "first-entry" %}
@@ -0,0 +1,4 @@
---
name: papers
description: "Notes written down while reading and trying to understand random ML/SWE/CS papers. Originally not intended for the eyes of other people and therefore possibly incomprehensible and/or flat out wrong."
---
@@ -0,0 +1,4 @@
---
name: misc
description: "Various random content I thought might be interesting."
---
@@ -5,11 +5,7 @@
---

<div id="archives">
{% capture category_name %}papers{% endcapture %}
{% capture category_desc %}Notes written down while reading and trying to understand random ML/SWE/CS papers. Originally not intended for the eyes of other people and therefore possibly incomprehensible and/or flat out wrong. {% endcapture %}
{% include archive-category.html %}

{% capture category_name %}misc{% endcapture %}
{% capture category_desc %}Various random content I thought might be interesting. {% endcapture %}
{% include archive-category.html %}
{% for category_info in site.posts_category_info %}
{% include archive-category.html %}
{% endfor %}
</div>

0 comments on commit 6e19339

Please sign in to comment.