work with risotto
This commit is contained in:
parent
e336313018
commit
8327ef14e6
27 changed files with 627 additions and 0 deletions
32
layouts/_default/archives.html
Normal file
32
layouts/_default/archives.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ define "main" }}
|
||||
<section>
|
||||
{{ $type := .Type }}
|
||||
{{ $.Scratch.Set "count" 1 }}
|
||||
|
||||
{{ range (.Site.RegularPages.GroupByDate "2006") }}
|
||||
{{ if and (gt .Key 1) (gt (where .Pages "Type" $type) 0) }}
|
||||
|
||||
{{ range (where .Pages "Type" $type) }}
|
||||
{{ if (eq ($.Scratch.Get "count") 1) }}
|
||||
{{ $.Scratch.Set "count" 0 }}
|
||||
<h1>{{ .Date.Format "2006" }}</h1>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $.Scratch.Set "count" 1 }}
|
||||
|
||||
<ul>
|
||||
{{ range (where .Pages "Type" $type) }}
|
||||
{{ if (ne .Params.hidden true) }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<span>{{ .Date.Format "02 Jan" }}</span> — {{ .Title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue