-<ol class="crumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
- {{- /* declare a 'variable' to store the each link position */}}
- {{- $data := newScratch }}
+<div id="breadcrumbs">
+ <p>You're in: </p>
+ <ol class="crumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
+ {{- /* declare a 'variable' to store the each link position */}}
+ {{- $data := newScratch }}
- {{- range $index, $value := .Ancestors.Reverse }}
- <li class="crumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
- {{- /* read the index from loop and add 'one', because it starts counting from zero */}}
- {{- $data.Set "counter" $index }}
- {{- $data.Add "counter" 1 }}
- <a itemprop="item" href="{{.Permalink}}">
- {{ if .IsHome }}
- <span itemprop="name">home</span>
- {{ else }}
+ {{- range $index, $value := .Ancestors.Reverse }}
+ <li class="crumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
+ {{- /* read the index from loop and add 'one', because it starts counting from zero */}}
+ {{- $data.Set "counter" $index }}
+ {{- $data.Add "counter" 1 }}
+ <a itemprop="item" href="{{.Permalink}}">
+ {{ if .IsHome }}
+ <span itemprop="name">home</span>
+ {{ else }}
+ <span itemprop="name">{{.Title}}</span>
+ {{ end }}
+ </a>
+ {{- /* pass the counter value into schema attribute */}}
+ <meta itemprop="position" content='{{ $data.Get "counter"}}' />
+ </li>
+ {{- end }}
+ <li class="crumb-item active" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
+ {{- /* add 'one' one more time for the last link position */}}
+ {{- $data.Add "counter" 1 }}
<span itemprop="name">{{.Title}}</span>
- {{ end }}
- </a>
- {{- /* pass the counter value into schema attribute */}}
- <meta itemprop="position" content='{{ $data.Get "counter"}}' />
- </li>
- {{- end }}
- <li class="crumb-item active" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
- {{- /* add 'one' one more time for the last link position */}}
- {{- $data.Add "counter" 1 }}
- <span itemprop="name">{{.Title}}</span>
- {{- /* pass the counter value into schema attribute */}}
- <meta itemprop="position" content='{{ $data.Get "counter"}}' />
- </li>
-</ol>
\ No newline at end of file
+ {{- /* pass the counter value into schema attribute */}}
+ <meta itemprop="position" content='{{ $data.Get "counter"}}' />
+ </li>
+ </ol>
+</div>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE html>
-<html lang="{{ $.Site.LanguageCode | default "en" }}">
- {{- partial "head.html" . -}}
- <body class="single-post blog">
- <div id="page" class="blog-post">
- <a id="top" class="skip-link screen-reader-text" href="#primary">skip to content</a>
- {{- partial "header.html" . -}}
- {{- partial "breadcrumbs.html" . -}}
- <div id="content" class="site-content">
- <div id="primary" class="content-area">
- <main id="main" class="site-main">
- {{- block "post-main" . }}{{- end }}
- </main>
- </div>
- <div id="secondary" class="related-content">
- {{- partial "funcs/tags.html" . -}}
- {{- partial "funcs/categories.html" . -}}
- </div>
- </div>
- {{- partial "footer.html" . -}}
- </div>
- </body>
-</html>