Skip to content

Commit 2e0aa51

Browse files
committed
modify tags
1 parent 867f4ea commit 2e0aa51

File tree

6 files changed

+31
-29
lines changed

6 files changed

+31
-29
lines changed

docs/_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
alt="{{ page.title }}" />
2626
</div>
2727
{% if page.photo_credit %}
28-
<div class="text-italic text-light text-small text-right">Photo Credit: {{ page.photo_credit }}</div>
28+
<div class="text-italic text-light text-small text-right">Image Credit: {{ page.image_credit }}</div>
2929
{% endif %}
3030
{%- endif %}
3131
</div>

docs/_layouts/tag_index.html

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,36 @@
22
title: Tags
33
layout: page
44
---
5+
56
{% assign max_posts = page.max_posts | default: 6 %}
7+
{% assign tag_posts = 0 %}
8+
69
<h1 class="h3-mktg mt-4 mb-6 mb-md-8">{{ page.title }}</h1>
710

811
{% for tag in site.tags %}
912
<h2 class="h6-mktg section-heading">{{ tag[0] | capitalize }}</h2>
1013
<div class="d-flex flex-wrap gutter-spacious">
11-
{% for post in tag[1] limit: max_posts %}
12-
{%- include post-card.html %}
13-
{% endfor %}
14-
{% if tag[1].size > max_posts %}
15-
{%- if site.tag_page_dir -%}
16-
{%- capture tag_link %}/{{ site.tag_page_dir }}/{{ tag | first | jekyll_tagging_slug }}{%
17-
endcapture %}
18-
{%- else -%}
19-
{%- capture tag_link %}{{site.tag_archive_path}}{{ tag | first | slugify }}{% endcapture %}
20-
{%- endif -%}
21-
<div class="px-4">
22-
<a href="{{ tag_link }}" class="link-mktg arrow-target-mktg text-semibold f4-mktg">
23-
More
24-
<svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16"
25-
viewBox="0 0 16 16" fill="none">
26-
<path fill="currentColor"
27-
d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z">
28-
</path>
29-
<path stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path>
30-
</svg>
31-
</a>
32-
</div>
33-
{%- endif %}
14+
15+
{% for post in site.posts %}
16+
{% if post.tags contains tag[0] %}
17+
{% include post-card.html %}
18+
{% tag_posts | plus: 1 %}
19+
{% if tag_posts == max_posts %}
20+
{% if tag[1].size > max_posts %}
21+
{% capture tag_url %}{{ site.url }}{{ site.baseurl }}{{ site.tag_page_dir | default: tags }}/{{ tag | first | slugify }}{% endcapture%}
22+
<div class="px-4">
23+
<a href="{{ tag_url }}" class="link-mktg arrow-target-mktg text-semibold f4-mktg">
24+
More
25+
<svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none">
26+
<path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path>
27+
<path stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path>
28+
</svg>
29+
</a>
30+
</div>
31+
{% endif %}
32+
{% break %}
33+
{% endif %}
34+
{% endif %}
35+
{% endfor %}
3436
</div>
3537
{% endfor %}

docs/_layouts/tags.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
layout: page
33
---
44
<p class="f4-mktg color-text-tertiary mt-4 mt-md-7 mb-n4">Articles tagged with</p>
5-
<h1 class="h3-mktg mt-4 mb-6 mb-md-8">{{ page.tag | capitalize }}</h1>
5+
<h1 class="h3-mktg mt-4 mb-6 mb-md-8">{{ page.tag-name | capitalize }}</h1>
66

77
<div class="d-flex flex-wrap gutter-spacious">
88
{% for post in site.posts %}
9-
{% if post.tags contains page.tag %}
9+
{% if post.tags contains page.tag-name %}
1010
{%- if post.feature or forloop.first %}
1111
{%- include post-feature-card.html %}
1212
{%- else %}

docs/_posts/2024-06-20-homelab.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: "What is a Homelab, and what can it do?"
33
author: Ragdata
44
category: general
5-
tags: [homelab]
5+
tags: [homelab, engineering]
66
image: /assets/img/posts/homelab.jpg
7-
photo_credit: "<a href=\"https://www.freepik.com/\" target=\"blank\">rcphotostock - Freepik.com</a>"
7+
image_credit: "<a href=\"https://www.freepik.com/\" target=\"blank\">rcphotostock - Freepik.com</a>"
88
---
99

1010
A Homelab - or "home laboratory" - is a personalised technology stack where hobbyists and professionals alike can experiment with various hardware configurations and software packages, or have private access to an almost endless range of digital services. Here's my take on why YOU need one, and what you need to know before you start putting it together:

docs/_tags/homelab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
layout: tags
3-
tag: homelab
3+
tag-name: homelab
44
---
File renamed without changes.

0 commit comments

Comments
 (0)