Skip to content

Commit

Permalink
pin posts
Browse files Browse the repository at this point in the history
  • Loading branch information
hoanhan101 committed Nov 30, 2020
1 parent 4a2cbff commit 188aebe
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
37 changes: 36 additions & 1 deletion _layouts/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,42 @@
title: Notes
---

<!-- This loops through the paginated posts -->
<!-- List popular posts -->
{% if paginator.page == 1 %}
<h3 style="color: gray;">POPULAR</h3>
{% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
{% for post in pinned %}
<article role="article">
<h2><a style="text-decoration: none;" href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
</a></h2>

<p>{{ post.summary }}</p>
{% unless post.summary %}
<p>{{ post.content | strip_html | truncatewords: 50 }}</p>
{% endunless %}

<time class="date" datetime="{{ post.date | date_to_xmlschema }}">
{{ post.date | date: "%B %-d, %Y" }} &middot;

{% assign words = post.content | number_of_words %}
{% if words < 360 %}
1 min
{% else %}
{{ words | divided_by:180 }} mins
{% endif %}
read &middot;

<a class="post" href="/category/{{post.category}}">{{ post.category | replace: "-", " " }}</a>
</time>
</article>
{% endfor %}

<hr>
<h3 style="color: gray;">RECENT</h3>
{% endif %}

<!-- List recent posts -->
{% for post in paginator.posts %}
<article role="article">
<h2><a style="text-decoration: none;" href="{{ site.baseurl }}{{ post.url }}">
Expand Down
1 change: 1 addition & 0 deletions _posts/2020-04-26-guide-to-the-good-life.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: A Guide to the Good Life by William Braxton Irvine
summary: Psychological techniques and advice to practice Stoicism for attaining a good life.
category: Key-takeaways-from-important-reading
tags: [book, stoic, happiness, meaning, life, death, wealth]
pin: true
---

- What is a good life according to Stoicism?
Expand Down
1 change: 1 addition & 0 deletions _posts/2020-07-05-design-data-intensive-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Designing Data-Intensive Applications by Martin Kleppmann
summary: Principles and practicalities of data systems and how to build data-intensive applications.
category: System-design-notes
tags: [book, architecture, data, system]
pin: true
---

<h2> Table of Contents </h2>
Expand Down
1 change: 1 addition & 0 deletions _posts/2020-08-25-the-ultimate-go-study-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: The Ultimate Go Study Guide
summary: For the last 3 months or so, I have spent most of my free time putting together Ultimate Go Study Guide into a 200-page book.
category: Product-releases
tags: [book, go, ultimate-go]
pin: true
---

A year ago, in August 2019, I shared this [Ultimate Go Study Guide project on GitHub](https://github.com/hoanhan101/ultimate-go), and surprisingly, it got a lot of attention from the community.
Expand Down
File renamed without changes.

0 comments on commit 188aebe

Please sign in to comment.