Add anchor link to archive layout headers
This commit is contained in:
parent
175059921f
commit
33e48f9892
|
@ -36,12 +36,21 @@
|
||||||
{{- range $pages.GroupByPublishDate "2006" }}
|
{{- range $pages.GroupByPublishDate "2006" }}
|
||||||
{{- if ne .Key "0001" }}
|
{{- if ne .Key "0001" }}
|
||||||
<div class="archive-year">
|
<div class="archive-year">
|
||||||
<h2 class="archive-year-header">
|
{{- $year := replace .Key "0001" "" }}
|
||||||
{{- replace .Key "0001" "" }}<sup class="archive-count"> {{ len .Pages }}</sup>
|
<h2 class="archive-year-header" id="{{ $year }}">
|
||||||
|
<a class="archive-header-link" href="#{{ $year }}">
|
||||||
|
{{- $year -}}
|
||||||
|
</a>
|
||||||
|
<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||||
</h2>
|
</h2>
|
||||||
{{- range .Pages.GroupByDate "January" }}
|
{{- range .Pages.GroupByDate "January" }}
|
||||||
<div class="archive-month">
|
<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">
|
<div class="archive-posts">
|
||||||
{{- range .Pages }}
|
{{- range .Pages }}
|
||||||
{{- if eq .Kind "page" }}
|
{{- if eq .Kind "page" }}
|
||||||
|
|
Loading…
Reference in New Issue