Skip to content

Commit

Permalink
no feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmaster6y committed Jun 5, 2024
1 parent fa9bbb0 commit 0612691
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions _layouts/listing-no-feed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: default
---

{% assign title = page.title %}
{% assign collection = site[page.collection]%}

<h1>{{ title }}</h1>

{{ content}}

<section>
{% if collection.size <= 1%}
<span>No item yet...</span>
<p>Be patient!</p>
{% else %}
{% assign sorted_collection = collection | sort: "publishedOn" | reverse %}
{% for item in sorted_collection %}
{% if item.title != title %}
{% if item.tags.size > 0 %}
<small class="date">{{ item.publishedOn | date: "%-d %B %Y" }}</small>
<small>| {{ item.readingTime }} min read </small>
<small>
| tags:
{% for tag in item.tags %}
<em><a href="/tags/{{ tag | downcase }}" class="tag"> {{ tag }} <i class="fa-solid fa-tag"></i></a></em>
{% endfor %}
</small>
{% else %}
<small>{{ item.publishedOn | date: "%-d %B %Y" }}</small>
{% endif %}
<h3><a href="{{ item.url }}">{{ item.title }}</a></h3>
<div class="thumbnail">
{% if item.image %}
<a href="{{ item.url }}"><img src="{{ item.image }}" alt="{{ item.title }}" class="thumbnail" /></a>
{% endif %}
{% if item.tldr %}
<p class="tldr">
<small>{{ item.tldr}}</small>
</p>
{% endif %}
</div>
{% endif %}
{% endfor %}
{% endif %}
</section>
2 changes: 1 addition & 1 deletion pages/_drafts/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Drafts
layout: listing
layout: listing-no-feed
---

<blockquote class="callout warning"> <div class="callout-title"> <i class="fa-solid fa-triangle-exclamation" href="#"></i>
Expand Down
2 changes: 1 addition & 1 deletion pages/_publications/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: Publications
layout: listing
layout: listing-no-feed
---

0 comments on commit 0612691

Please sign in to comment.