Compare commits
3 Commits
743187c6f2
...
d55833dbce
Author | SHA1 | Date |
---|---|---|
Christian | d55833dbce | |
Aditya Telange | 33e48f9892 | |
zeeZ | 05ba5a763f |
|
@ -36,12 +36,21 @@
|
|||
{{- range $pages.GroupByPublishDate "2006" }}
|
||||
{{- if ne .Key "0001" }}
|
||||
<div class="archive-year">
|
||||
<h2 class="archive-year-header">
|
||||
{{- replace .Key "0001" "" }}<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
{{- $year := replace .Key "0001" "" }}
|
||||
<h2 class="archive-year-header" id="{{ $year }}">
|
||||
<a class="archive-header-link" href="#{{ $year }}">
|
||||
{{- $year -}}
|
||||
</a>
|
||||
<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
</h2>
|
||||
{{- range .Pages.GroupByDate "January" }}
|
||||
<div class="archive-month">
|
||||
<h3 class="archive-month-header">{{- .Key }}<sup class="archive-count"> {{ len .Pages }}</sup></h3>
|
||||
<h3 class="archive-month-header" id="{{ $year }}-{{ .Key }}">
|
||||
<a class="archive-header-link" href="#{{ $year }}-{{ .Key }}">
|
||||
{{- .Key -}}
|
||||
</a>
|
||||
<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
</h3>
|
||||
<div class="archive-posts">
|
||||
{{- range .Pages }}
|
||||
{{- if eq .Kind "page" }}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||
{{- $bc_list := (split $lang_url "/")}}
|
||||
{{- $position := 0 }}
|
||||
|
||||
{{- $scratch := newScratch }}
|
||||
<script type="application/ld+json">
|
||||
|
@ -34,10 +35,11 @@
|
|||
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||
|
||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||
{{- $position = add 1 $position }}
|
||||
{{- if (and $index)}}, {{end }}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{ add 1 $index }},
|
||||
"position": {{ $position }},
|
||||
"name": {{ $bc_pg.Name }},
|
||||
"item": {{ $bc_pg.Permalink | safeHTML }}
|
||||
}
|
||||
|
@ -45,10 +47,10 @@
|
|||
|
||||
{{- end }}
|
||||
{{- /* self-page addition */ -}}
|
||||
{{- if (ge (len $bc_list) 2) }}, {{end }}
|
||||
{{- if (gt $position 0) }}, {{end }}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{len $bc_list}},
|
||||
"position": {{ add 1 $position }},
|
||||
"name": {{ .Name }},
|
||||
"item": {{ .Permalink | safeHTML }}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue