Skip to content

Commit

Permalink
added RSS feeds for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhall committed Oct 4, 2024
1 parent 3519462 commit 02cd02e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ compress_html:
ignore:
envs: development

# Jekyll Feeds
feed:
tags: true

# Defaults
defaults:
# _posts
Expand Down
42 changes: 42 additions & 0 deletions _includes/posts-taxonomy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% assign items_max = 0 %}
{% for item in include.taxonomies %}
{% if item[1].size > items_max %}
{% assign items_max = item[1].size %}
{% endif %}
{% endfor %}

<ul class="taxonomy__index">
{% for i in (1..items_max) reversed %}
{% for item in include.taxonomies %}
{% if item[1].size == i %}
<li>
<a href="#{{ item[0] | slugify }}">
<strong>{{ item[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>

{% assign entries_layout = page.entries_layout | default: 'list' %}
{% for i in (1..items_max) reversed %}
{% for taxonomy in include.taxonomies %}
{% if taxonomy[1].size == i %}
<section id="{{ taxonomy[0] | slugify }}" class="taxonomy__section">
<h2 class="archive__subtitle">
<span>{{ taxonomy[0] }}</span>
<a href="{{ '/feed/by_tag/' | append: taxonomy[0] | append: '.xml' | relative_url }}">
<i class="fas fa-square-rss"></i>
</a>
</h2>
<div class="entries-{{ entries_layout }}">
{% for post in taxonomy.last %}
{% include archive-single.html type=entries_layout %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endif %}
{% endfor %}
{% endfor %}
2 changes: 1 addition & 1 deletion _posts/2024/06/2024-06-05-swa-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Build a Blog: Deploy Azure Infrastructure three ways"
date: 2024-06-05
categories: infrastructure
tags: [ bicep, azd, azure, staticwebapp ]
tags: [ bicep, azd, azure, staticwebapps ]
header:
image: "/assets/images/2024/06/2024-06-05-banner.png"
---
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024/06/2024-06-08-swa-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Build a Blog: Going to production with Azure Static Web Apps"
date: 2024-06-08
categories: infrastructure
tags: [ bicep, azd, azure, staticwebapp ]
tags: [ bicep, azd, azure, staticwebapps ]
header:
image: "/assets/images/2024/06/2024-06-08-banner.png"
---
Expand Down

0 comments on commit 02cd02e

Please sign in to comment.