{{ define "main" }}
{{ if isset .Site.Params "socialicons" }}
{{ end }} {{ if os.FileExists "index-about.md" }}
{{ readFile "index-about.md" | markdownify }}
{{ end }} {{ if isset .Site.Params "showpostsonhomepage" }}

{{ lower (.Site.Params.ShowPostsOnHomePage | humanize) }} theses

{{ $posts := where .Site.Pages "Params.type" "post" }} {{ if eq .Site.Params.ShowPostsOnHomePage "popular" }} {{ range $posts.ByWeight | first 4 }} {{- partial "list-posts.html" . -}} {{ end }} {{ else if eq .Site.Params.ShowPostsOnHomePage "recent" }} {{ range $posts.ByDate.Reverse | first 4 }} {{- partial "list-posts.html" . -}} {{ end }} {{ end }}
{{ end }} {{ end }}