|
| 1 | +--- |
| 2 | +layout: page |
| 3 | +title: "Books" |
| 4 | +permalink: /books/ |
| 5 | +--- |
| 6 | + |
| 7 | +<div class="post-list"> |
| 8 | + <!-- Pinned book posts first --> |
| 9 | + {% assign pinned_book_posts = site.posts | where: "pinned", true | where_exp: "post", "post.tags contains 'books'" %} |
| 10 | + {% for post in pinned_book_posts %} |
| 11 | + <article class="pinned-post"> |
| 12 | + <span class="pinned-label">📌</span> |
| 13 | + <small> |
| 14 | + Published: {{ post.date | date_to_string }} |
| 15 | + {% if post.updated %} |
| 16 | + <br><span class="updated-date">Updated: {{ post.updated | date_to_string }}</span> |
| 17 | + {% endif %} |
| 18 | + </small> |
| 19 | + <h2><a href="{{ post.url }}">{{ post.title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h2> |
| 20 | + <p>{{ post.excerpt }}</p> |
| 21 | + {% if post.tags.size > 0 %} |
| 22 | + <div class="post-tags"> |
| 23 | + {% for tag in post.tags %} |
| 24 | + <a href="{{site.baseurl}}/archive.html#{{tag | slugize}}" class="post-tag">#{{ tag }}</a> |
| 25 | + {% endfor %} |
| 26 | + </div> |
| 27 | + {% endif %} |
| 28 | + </article> |
| 29 | + {% endfor %} |
| 30 | + |
| 31 | + <!-- Regular book posts (excluding pinned ones) --> |
| 32 | + {% assign regular_book_posts = site.posts | where: "pinned", nil | where_exp: "post", "post.tags contains 'books'" %} |
| 33 | + {% for post in regular_book_posts %} |
| 34 | + <article> |
| 35 | + <small> |
| 36 | + Published: {{ post.date | date_to_string }} |
| 37 | + {% if post.updated %} |
| 38 | + <br><span class="updated-date">Updated: {{ post.updated | date_to_string }}</span> |
| 39 | + {% endif %} |
| 40 | + </small> |
| 41 | + <h2><a href="{{ post.url }}">{{ post.title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h2> |
| 42 | + <p>{{ post.excerpt }}</p> |
| 43 | + {% if post.tags.size > 0 %} |
| 44 | + <div class="post-tags"> |
| 45 | + {% for tag in post.tags %} |
| 46 | + <a href="{{site.baseurl}}/archive.html#{{tag | slugize}}" class="post-tag">#{{ tag }}</a> |
| 47 | + {% endfor %} |
| 48 | + </div> |
| 49 | + {% endif %} |
| 50 | + </article> |
| 51 | + {% endfor %} |
| 52 | +</div> |
0 commit comments