From 338905626f4eca069598a515ad6a4527b28ad385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=A7=89=20infominer?= Date: Mon, 23 Jan 2023 05:44:44 -0500 Subject: [PATCH] use data for tags --- _includes/archive-single.html | 39 +++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/_includes/archive-single.html b/_includes/archive-single.html index c0368b68..7ac71745 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -32,6 +32,41 @@ {% if post.excerpt %}

{{ post.excerpt | markdownify | strip_html | truncate: 300 }}

{% endif %}

Updated: {{ post.last_modified_at }} {% include read-time.html %}

- {% if post.tags %}{% assign sorted_tags = post.tags | sort %}{% for tag in sorted_tags %}
{{ tag }}
{% endfor %}
{% endif %}
+ + {% if post.name %} + {% assign name = post.name %} + {% for company in site.data.companys %} + {% assign dname = company.name %} + {% if dname == name %} + {% if company.parent %} + {% assign related = company.parent %} + {% assign splittags = company.related | split: ";" %} + {% assign splittags = splittags | push: related | push: name %} + {% assign sorted_tags = splittags | compact | sort_natural %} + {% for tag in sorted_tags %} +
{{ tag }}
+ {% endfor %}
+ {% elsif company.related %} + {% assign related = company.related %} + {% assign splittags = related | append: ";" | append: name %} + {% assign splittags = splittags | split: ";" | compact %} + {% assign sorted_tags = splittags | sort_natural %} + {% for tag in sorted_tags %} +
{{ tag }}
+ {% endfor %}
+ {% else %} + {% assign sorted_tags = company.name %} + {% for tag in sorted_tags %} +
{{ tag }}
+ {% endfor %}
+ {% endif %} + {% endif %} + {% endfor %} + {% elsif post.tags %} + {% assign sorted_tags = post.tags | sort %} + {% for tag in sorted_tags %} +
{{ tag }}
+ {% endfor %}
+ {% endif %}
- + \ No newline at end of file