Skip to content

Commit 10507a8

Browse files
authored
Added anchor to category sections (#2006)
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
1 parent 25eac65 commit 10507a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_pages/projects.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ horizontal: false
1414
{% if site.enable_project_categories and page.display_categories %}
1515
<!-- Display categorized projects -->
1616
{% for category in page.display_categories %}
17-
<h2 class="category">{{ category }}</h2>
17+
<a id="{{ category }}" href=".#{{ category }}">
18+
<h2 class="category">{{ category }}</h2>
19+
</a>
1820
{% assign categorized_projects = site.projects | where: "category", category %}
1921
{% assign sorted_projects = categorized_projects | sort: "importance" %}
2022
<!-- Generate cards for each project -->

0 commit comments

Comments
 (0)