Add anchor link to archive layout headers
This commit is contained in:
parent
175059921f
commit
33e48f9892
|
@ -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" }}
|
||||
|
|
Loading…
Reference in New Issue