This commit is contained in:
parent
b9a71a45cb
commit
8e77da509a
|
@ -0,0 +1,12 @@
|
|||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL }}
|
||||
<ol class="breadcrumbs">
|
||||
<li><a href="/">home</a></li>
|
||||
{{ range $index, $element := split $url "/" }}
|
||||
{{ $.Scratch.Add "path" $element }}
|
||||
{{ if ne $element "" }}
|
||||
<li><a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a></li>
|
||||
{{ $.Scratch.Add "path" "/" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ol>
|
Loading…
Reference in New Issue