Skip to content

Commit

Permalink
Added anchor to category sections (alshedivat#2006)
Browse files Browse the repository at this point in the history
Added anchor to categories so one could navigate to the category section
from the URL:

e.g.,

https://alshedivat.github.io/al-folio/projects#fun
  • Loading branch information
fabawi authored Jan 23, 2024
1 parent 25eac65 commit 10507a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _pages/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ horizontal: false
{% if site.enable_project_categories and page.display_categories %}
<!-- Display categorized projects -->
{% for category in page.display_categories %}
<h2 class="category">{{ category }}</h2>
<a id="{{ category }}" href=".#{{ category }}">
<h2 class="category">{{ category }}</h2>
</a>
{% assign categorized_projects = site.projects | where: "category", category %}
{% assign sorted_projects = categorized_projects | sort: "importance" %}
<!-- Generate cards for each project -->
Expand Down

0 comments on commit 10507a8

Please sign in to comment.