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
This commit is contained in:
parent
25eac655ba
commit
10507a882b
|
|
@ -14,7 +14,9 @@ horizontal: false
|
||||||
{% if site.enable_project_categories and page.display_categories %}
|
{% if site.enable_project_categories and page.display_categories %}
|
||||||
<!-- Display categorized projects -->
|
<!-- Display categorized projects -->
|
||||||
{% for category in page.display_categories %}
|
{% 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 categorized_projects = site.projects | where: "category", category %}
|
||||||
{% assign sorted_projects = categorized_projects | sort: "importance" %}
|
{% assign sorted_projects = categorized_projects | sort: "importance" %}
|
||||||
<!-- Generate cards for each project -->
|
<!-- Generate cards for each project -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue