-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make breadcrumbs & wiki-breadcrumbs lists with ::after "/"; add to pages
- Loading branch information
1 parent
c3ca8cf
commit 80cc36b
Showing
5 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% case site.category_archive.type %} | ||
{% when "liquid" %} | ||
{% assign path_type = "#" %} | ||
{% when "jekyll-archives" %} | ||
{% assign path_type = nil %} | ||
{% endcase %} | ||
|
||
{% if page.collection != 'posts' %} | ||
{% assign path_type = nil %} | ||
{% assign crumb_path = '/' %} | ||
{% else %} | ||
{% assign crumb_path = site.category_archive.path %} | ||
{% endif %} | ||
|
||
<nav class="breadcrumbs"> | ||
<ol itemscope itemtype="https://schema.org/BreadcrumbList"> | ||
{% assign crumbs = page.url | split: '/' %} | ||
{% assign i = 1 %} | ||
{% for crumb in crumbs offset: 1 %} | ||
{% if forloop.first %} | ||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> | ||
<a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a> | ||
|
||
<meta itemprop="position" content="{{ i }}" /> | ||
</li> | ||
{% comment %}<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>{% endcomment %} | ||
{% endif %} | ||
{% if forloop.last %} | ||
<li class="current">{{ page.title }}</li> | ||
{% else %} | ||
{% assign i = i | plus: 1 %} | ||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> | ||
<a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a> | ||
<meta itemprop="position" content="{{ i }}" /> | ||
</li> | ||
{% comment %}<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>{% endcomment %} | ||
{% endif %} | ||
{% endfor %} | ||
</ol> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} | ||
{% include page__hero.html %} | ||
{% elsif page.header.video.id and page.header.video.provider %} | ||
{% include page__hero_video.html %} | ||
{% endif %} | ||
|
||
{% include breadcrumbs.html %} | ||
|
||
<div id="main" role="main"> | ||
{% include sidebar.html %} | ||
|
||
<div class="archive"> | ||
{% unless page.header.overlay_color or page.header.overlay_image %} | ||
<h1 id="page-title" class="page__title">{{ page.title }}</h1> | ||
{% endunless %} | ||
{{ content }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters