Skip to content

Commit

Permalink
archive Layout 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
YalySeung committed Dec 14, 2023
1 parent 4b715e7 commit 3d346dc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ <h2 class="archive__item-title no_toc" itemprop="headline">
{% endif %}
</h2>
{% include page__meta.html type=include.type %}
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
{% if site.category_archive.type and post.categories[0] and site.tag_archive.type and post.tags[0] %}
{%- include post__taxonomy.html -%}
{% endif %}
</article>
</div>
25 changes: 25 additions & 0 deletions _includes/post__taxonomy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--Archive page 용-: (post -> page)-->
<!--page__taxonomy.html에서 가져 옴-->

{%- if site.category_archive.type and post.categories[0] -%}
{% case site.tag_archive.type %}
{% when "liquid" %}
{% assign path_type = "#" %}
{% when "jekyll-archives" %}
{% assign path_type = nil %}
{% endcase %}

{%- if site.tag_archive.path -%}
{% capture post_tags %}{% for tag in post.tags %}{{ tag | downcase }}|{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign tag_hashes = post_tags | split: ',' | sort %}
<span class="page__taxonomy">
<span itemprop="keywords">
{% for hash in tag_hashes %}
{% assign keyValue = hash | split: '|' %}
{% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
<a href="{{ tag_word | slugify | prepend: path_type | prepend: site.tag_archive.path | relative_url }}" class="page__taxonomy-item p-category" rel="tag">#{{ tag_word }}</a>{% unless forloop.last %}<span class="sep"> </span>{% endunless %}
{% endfor %}
</span>
</span>
{%- endif -%}
{%- endif -%}

0 comments on commit 3d346dc

Please sign in to comment.