Skip to content

Commit

Permalink
handle custom order for articles
Browse files Browse the repository at this point in the history
  • Loading branch information
rushatgabhane committed Jul 16, 2024
1 parent 7179146 commit ba1050f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/_includes/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ <h1 class="title">

<section>
<div class="cards-group">
{% for article in section.articles %}
{% assign sortedArticles = section.articles | sort: 'order', 'last' | default: 999 %}
{% for article in sortedArticles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include article-card.html hub=hub.href href=article_href title=article.title platform=activePlatform %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

{% include section.html %}

0 comments on commit ba1050f

Please sign in to comment.