diff --git a/layouts/index.html b/layouts/index.html index f321f35..6e5b69b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -29,46 +29,41 @@

Featured Articles

- {{ range first 2 (where .Site.Data.wordpress.posts "status" "publish") }} - {{ $author := index .Site.Data.wordpress.authors .author }} - {{ $categories := slice }} - {{ range .categories }} - {{ $categoryID := . }} - {{ range $.Site.Data.wordpress.categories }} - {{ if eq .id $categoryID }} - {{ $categories = $categories | append .name }} - {{ end }} - {{ end }} - {{ end }} - + {{ range first 2 $.Site.RegularPages }}
- {{ if .featured_image }} - {{ .title.rendered | plainify }} + {{ if .Params.featured_image }} + {{ .Title }} {{ else }} - {{ .title.rendered | plainify }} + {{ .Title }} {{ end }}
- {{ range first 2 $categories }} + {{ range first 2 .Params.categories }} {{ . }} {{ end }}
-

{{ .title.rendered | plainify }}

-

{{ .excerpt.rendered | plainify | truncate 150 }}

+

+ {{ .Title }} +

+

+ {{ if .Params.excerpt }} + {{ .Params.excerpt }} + {{ else if .Summary }} + {{ .Summary }} + {{ else }} + {{ truncate 200 .Content }} + {{ end }} +

- {{ if $author.avatar_url }} - {{ $author.name }} - {{ else }} - {{ $author.name }} - {{ end }} - {{ $author.name }} + {{ .Params.author }} + {{ .Params.author }} - {{ .date | time.Format "Jan 2, 2006" }} + {{ .Date | time.Format "Jan 2, 2006" }}
- Read more → + Read more →
@@ -90,35 +85,31 @@

Latest Articles

- {{ range first 6 (after 2 (where .Site.Data.wordpress.posts "status" "publish")) }} - {{ $author := index .Site.Data.wordpress.authors .author }} - {{ $categories := slice }} - {{ range .categories }} - {{ $categoryID := . }} - {{ range $.Site.Data.wordpress.categories }} - {{ if eq .id $categoryID }} - {{ $categories = $categories | append .name }} - {{ end }} - {{ end }} - {{ end }} - + {{ range first 6 (after 2 $.Site.RegularPages) }}
- {{ if .featured_image }} - {{ .title.rendered | plainify }} + {{ if .Params.featured_image }} + {{ .Title }} {{ else }} - {{ .title.rendered | plainify }} + {{ .Title }} {{ end }}
- {{ range first 1 $categories }} + {{ range first 1 .Params.categories }} {{ . }} {{ end }}
-

{{ .title.rendered | plainify }}

-

{{ .excerpt.rendered | plainify | truncate 100 }}

+

{{ .Title }}

+

+ {{ if .Params.excerpt }} + {{ .Params.excerpt }} + {{ else if .Summary }} + {{ .Summary }} + {{ else }} + {{ truncate 200 .Content }} + {{ end }} +

- {{ .date | time.Format "Jan 2, 2006" }} - {{ .reading_time | default "5" }} min read + {{ .Date | time.Format "Jan 2, 2006" }}