diff --git a/layouts/_default/index.html b/layouts/_default/index.html new file mode 100644 index 0000000..c47f81c --- /dev/null +++ b/layouts/_default/index.html @@ -0,0 +1,46 @@ +{{ define "main" }} +{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} +{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} + +{{ $PageContext := . }} +{{ if .IsHome }} +{{ $PageContext = .Site }} +{{ end }} +{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} + +{{- range $index, $page := $paginator.Pages }} + +{{- $class := "post-entry" }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }} +{{- $class = "first-entry" }} +{{- else if .Data.Term }} +{{- $class = "post-entry tag-entry" }} +{{- end }} + + + {{ .Title }} + + + {{ .Summary | plainify | htmlUnescape }}... + + + + +{{- end }} + +{{- if gt $paginator.TotalPages 1 }} + +{{- end }} + +{{ end }}{{/* end main */}} \ No newline at end of file
{{ .Summary | plainify | htmlUnescape }}...