Add breadcrumb navigation include
- Disable by default - Add schema.org markup - Add basic styling
This commit is contained in:
parent
239c949298
commit
7c77274567
5 changed files with 63 additions and 13 deletions
|
@ -7,14 +7,17 @@
|
||||||
|
|
||||||
# Site Settings
|
# Site Settings
|
||||||
locale : en_US
|
locale : en_US
|
||||||
title : "Your awesome site"
|
title : "Your Awesome Site"
|
||||||
name : &name "Your Name"
|
|
||||||
title_separator : "-"
|
title_separator : "-"
|
||||||
|
name : &name "Your Name"
|
||||||
description : &description "Write an awesome description for your new site here."
|
description : &description "Write an awesome description for your new site here."
|
||||||
url : "http://localhost:4000" # the base hostname & protocol for your site
|
url : "http://localhost:4000" # the base hostname & protocol for your site
|
||||||
baseurl : "/minimal-mistakes" # the subpath of your site, e.g. /blog
|
baseurl : "/minimal-mistakes" # the subpath of your site, e.g. /blog
|
||||||
email : "your-email@domain.com"
|
email : "your-email@domain.com"
|
||||||
logo : "site-logo.png"
|
logo : "site-logo.png"
|
||||||
|
breadcrumbs : # true / false (default)
|
||||||
|
breadcrumb_home_label : "Home"
|
||||||
|
breadcrumb_separator : "/"
|
||||||
twitter:
|
twitter:
|
||||||
username : &twitter "site_twitter"
|
username : &twitter "site_twitter"
|
||||||
facebook:
|
facebook:
|
||||||
|
@ -135,7 +138,7 @@ gems:
|
||||||
- jekyll-gist
|
- jekyll-gist
|
||||||
|
|
||||||
# Outputting
|
# Outputting
|
||||||
permalink: /:title/
|
permalink: /:categories/:title/
|
||||||
paginate_path: /page:num
|
paginate_path: /page:num
|
||||||
timezone: America/New_York # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
timezone: America/New_York # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
|
|
||||||
|
|
25
_includes/breadcrumbs.html
Normal file
25
_includes/breadcrumbs.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<nav class="breadcrumbs">
|
||||||
|
<ol itemscope itemtype="http://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="http://schema.org/ListItem">
|
||||||
|
<a href="{{ absurl }}/" itemprop="item"><span itemprop="name">{{ site.breadcrumb_home_label }}</span></a>
|
||||||
|
<meta itemprop="position" content="{{ i }}" />
|
||||||
|
</li>
|
||||||
|
<span class="sep">{{ site.breadcrumb_separator }}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if forloop.last %}
|
||||||
|
<li class="current">{{ page.title }}</li>
|
||||||
|
{% else %}
|
||||||
|
{% assign i = i | plus: 1 %}
|
||||||
|
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
|
||||||
|
<a href="{{ absurl }}{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
|
||||||
|
<meta itemprop="position" content="{{ i }}" />
|
||||||
|
</li>
|
||||||
|
<span class="sep">{{ site.breadcrumb_separator }}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
|
</nav>
|
|
@ -17,19 +17,23 @@ layout: compress
|
||||||
|
|
||||||
{% if page.header.image %}
|
{% if page.header.image %}
|
||||||
<div class="image-wrap">
|
<div class="image-wrap">
|
||||||
<img src=
|
<img src=
|
||||||
{% if page.header.image contains "http" %}
|
{% if page.header.image contains "http" %}
|
||||||
"{{ page.header.image }}"
|
"{{ page.header.image }}"
|
||||||
{% else %}
|
{% else %}
|
||||||
"{{ page.header.image | prepend: "/images/" | prepend: absurl }}"
|
"{{ page.header.image | prepend: "/images/" | prepend: absurl }}"
|
||||||
|
{% endif %}
|
||||||
|
alt="{{ page.title }}">
|
||||||
|
{% if page.header.caption %}
|
||||||
|
<span class="image-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
alt="{{ page.title }}">
|
|
||||||
{% if page.header.caption %}
|
|
||||||
<span class="image-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- /.image-wrap -->
|
</div><!-- /.image-wrap -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.breadcrumbs %}
|
||||||
|
{% include breadcrumbs.html %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div id="main" role="main">
|
<div id="main" role="main">
|
||||||
<div class="author-profile">
|
<div class="author-profile">
|
||||||
{% include author-profile.html %}
|
{% include author-profile.html %}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
layout: archive
|
layout: archive
|
||||||
title: "Recipes Archive"
|
title: "Recipes Archive"
|
||||||
permalink: /recipes-archive/
|
permalink: /recipes/
|
||||||
---
|
---
|
||||||
{% include absolute-url.liquid %}
|
{% include absolute-url.liquid %}
|
||||||
{% include group-by-array.html collection=site.recipes field='categories' %}
|
{% include group-by-array.html collection=site.recipes field='categories' %}
|
||||||
|
|
|
@ -654,6 +654,7 @@ $button-size: 1.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Google search form
|
Google search form
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
@ -685,3 +686,20 @@ $button-size: 1.5rem;
|
||||||
#goog-wm-sb {
|
#goog-wm-sb {
|
||||||
@extend .btn;
|
@extend .btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Breadcrumbs
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.breadcrumbs {
|
||||||
|
ol {
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.current {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue