Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed link to blog when showing years in news

Signed-off-by: George Araujo <george.gcac@gmail.com>
  • Loading branch information
george-gca authored and adityarauniyar committed Jan 17, 2024
1 parent 383a868 commit d296327
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,40 @@
</style>
{% endif %}

{% assign url_beginning = page.url | slice: 0, 6 %}

<div class="post">

<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }}{%- if page.author -%} • {{ page.author }}{%- endif -%}{%- if page.meta -%} • {{ page.meta }}{%- endif -%}</p>
<p class="post-tags">
{% if url_beginning == '/blog/' -%}
<a href="{{ year | prepend: '/blog/' | prepend: site.baseurl}}"> <i class="fa-solid fa-calendar fa-sm"></i> {{ year }} </a>
{% else %}
<i class="fa-solid fa-calendar fa-sm"></i> {{ year }}
{%- endif %}
{%- if tags != "" %}
&nbsp; &middot; &nbsp;
{% for tag in page.tags -%}
<a href="{{ tag | slugify | prepend: '/blog/tag/' | prepend: site.baseurl}}">
<i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }}</a> &nbsp;
{% if url_beginning == '/blog/' -%}
<a href="{{ tag | slugify | prepend: '/blog/tag/' | prepend: site.baseurl}}"> <i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }}</a> &nbsp;
{% else %}
<i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }} &nbsp;
{%- endif %}

{% endfor -%}
{% endif %}

{%- if categories != "" %}
&nbsp; &middot; &nbsp;
{% for category in page.categories -%}
<a href="{{ category | slugify | prepend: '/blog/category/' | prepend: site.baseurl}}">
<i class="fa-solid fa-tag fa-sm"></i> {{ category }}</a> &nbsp;
{% endfor -%}
{% if url_beginning == '/blog/' -%}
<a href="{{ category | slugify | prepend: '/blog/category/' | prepend: site.baseurl}}"> <i class="fa-solid fa-tag fa-sm"></i> {{ category }}</a> &nbsp;
{% else %}
<i class="fa-solid fa-tag fa-sm"></i> {{ category }} &nbsp;
{%- endif %}
{% endfor -%}
{% endif %}

</p>
Expand Down

0 comments on commit d296327

Please sign in to comment.