Skip to content

Commit

Permalink
Sorted categories
Browse files Browse the repository at this point in the history
  • Loading branch information
gnastacast committed Sep 28, 2023
1 parent 6c915b2 commit 7dce8ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
{% elsif item.dropdown_from_tags %}
{% assign category = item.name | downcase %}
{% assign posts = site.posts | where:"categories", category | where: 'published', 'true' %}
{% assign tags = posts | map: 'tags' | join: ',' | split: ',' | uniq %}
{% assign tags = posts | map: 'tags' | join: ',' | split: ',' | uniq | sort %}
<div class="navbar-item has-dropdown is-hoverable {% if site.fixed_navbar == 'bottom' %} has-dropdown-up {% endif %}">
<a href="{{ item.link | relative_url }}?tag=all" class="navbar-link {% if page.url contains item.link %}is-active{% endif %}">{{ item.name }}</a>
<div class="navbar-dropdown" style="text-transform:capitalize;"">
<div class="navbar-dropdown" style="text-transform:capitalize;">
<a href="{{ item.link | relative_url }}?tag=all" class="navbar-item {% if subitem.link == page.url %}is-active{% endif %}">All</a>
{% for tag in tags %}
{% assign tagName = tag | replace: "_", " " %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ content }}

{% assign posts = site.posts | where:"categories", page.category | where: 'published', 'true' %}
{% assign tags = posts | map: 'tags' | join: ',' | split: ',' | uniq %}
{% assign tags = posts | map: 'tags' | join: ',' | split: ',' | uniq | sort %}


<style type="text/css">
Expand Down

0 comments on commit 7dce8ef

Please sign in to comment.