Skip to content

Commit

Permalink
new order
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmaster6y committed Dec 31, 2023
1 parent a5fc25a commit 18a912e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _layouts/listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>{{ title }} <a href="/{{ title | downcase}}/feed.xml"><i class="fa-solid fa-
<span>No item yet...</span>
<p>Be patient!</p>
{% else %}
{% assign sorted_collection = collection | sort: "publishedOn" %}
{% assign sorted_collection = collection | sort: "publishedOn" | reverse %}
{% for item in sorted_collection %}
{% if item.title != title %}
{% if item.tags.size > 0 %}
Expand Down
6 changes: 3 additions & 3 deletions _layouts/tag-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<h1>Tagged <em class="tag-title">#{{ title }}</em></h1>
<section>
{% assign collection = site.stories %}
{% assign collection = site.stories | sort: "publishedOn" | reverse %}
{% assign story_count = 0 %}
{% for item in collection %}
{% if item.name != "index.md"%}
Expand All @@ -31,7 +31,7 @@ <h3><a href="{{ item.url }}">{{ item.title }}</a></h3>
{% endif %}
{% endfor %}

{% assign collection = site.projects%}
{% assign collection = site.projects | sort: "publishedOn" | reverse %}
{% assign project_count = 0 %}
{% for item in collection %}
{% if item.name != "index.md"%}
Expand All @@ -56,7 +56,7 @@ <h3><a href="{{ item.url }}">{{ item.title }}</a></h3>
{% endif %}
{% endfor %}

{% assign collection = site.projects %}
{% assign collection = site.projects | sort: "publishedOn" | reverse %}
{% assign article_count = 0 %}
{% for item in collection %}
{% if item.name != "index.md"%}
Expand Down
5 changes: 3 additions & 2 deletions pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ You'll find here a collection of stories, projects and articles.

## Pinned [stories](/stories/) [::rss::](/stories/feed.xml)

{% assign pinned_stories = "/stories/why-this-blog" | split: ", " %}
{% for story in site.stories %}
{% assign pinned_stories = "/stories/why-this-blog, /stories/my-approach-to-ai-safety" | split: ", " %}
{% assign collection = site.stories | sort: "publishedOn" | reverse %}
{% for story in collection %}
{% if pinned_stories contains story.url %}

### [{{ story.title }}]({{ story.url }})
Expand Down

0 comments on commit 18a912e

Please sign in to comment.