16
layouts/partials/_funs/cal_siteinfo.html
Normal file
16
layouts/partials/_funs/cal_siteinfo.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ $scratch := newScratch }}
|
||||
{{ $pages := (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections).ByLastmod.Reverse }}
|
||||
|
||||
{{ range $pages }}
|
||||
{{ $scratch.Add "totalWords" .WordCount }}
|
||||
{{ $scratch.Add "totalTimes" .ReadingTime }}
|
||||
{{ end }}
|
||||
|
||||
{{ range first 1 $pages }}
|
||||
{{ $scratch.Set "first" (time.Format .Site.Params.timeFormat .Date) }}
|
||||
{{ end }}
|
||||
{{ range last 1 $pages }}
|
||||
{{ $scratch.Set "last" (time.Format .Site.Params.timeFormat .Date) }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $scratch }}
|
||||
Reference in New Issue
Block a user