Skip to content

Commit af46bf8

Browse files
remove broken breadcrumb hyperlinks (#593)
- since jekyll-archives plugin is not allowed in GitHub Pages we will no longer link to the non-existent date-based archives (until a solution is found) - manually create the /blog/ link - start iterating over crumbs (created from splitting of URL on /) with offset 2 - simply display the crumb
1 parent b767cc4 commit af46bf8

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

_config-dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
port: 4000
22
url: 'http://localhost:4000'
3+
exclude:
4+
- .idea

_includes/breadcrumbs.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
<nav aria-label="breadcrumb">
33
<ol class="breadcrumb">
44
<li class="breadcrumb-item"><a href="/">Home</a></li>
5-
{% for crumb in crumbs offset: 1 %}
6-
{% if forloop.last %}
7-
<li class="breadcrumb-item active" aria-current="page">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</li>
8-
{% else %}
9-
<li class="breadcrumb-item"><a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a></li>
10-
{% endif %}
5+
<li class="breadcrumb-item"><a href="/blog/">Blog</a></li>
6+
{% for crumb in crumbs offset: 2 %}
7+
<li class="breadcrumb-item active" aria-current="page">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</li>
118
{% endfor %}
129
</ol>
1310
</nav>

0 commit comments

Comments
 (0)