diff --git a/layouts/shortcodes/blog.html b/layouts/shortcodes/blog.html index 817cf498a..796a86594 100644 --- a/layouts/shortcodes/blog.html +++ b/layouts/shortcodes/blog.html @@ -1,7 +1,5 @@ {{- $maxBlogPosts := 3 }} -{{/*expTimestamp: expire content every 1hour (6000s)*/}} -{{- $expTimestamp := div now.Unix 6000 }} -{{- $mediumURL := printf "https://api.rss2json.com/v1/api.json?timestamp=%d&rss_url=https://medium.com/feed/kialiproject" $expTimestamp }} +{{- $mediumURL := "https://www.toptal.com/developers/feed2json/convert?url=https://medium.com/feed/kialiproject" }} {{- $json := getJSON $mediumURL }} {{- $posts := first $maxBlogPosts $json.items }} {{- $latestPost := index $json.items 1 }} @@ -14,17 +12,16 @@

{{ range $posts }} - {{ $link := .link }} - {{ $img := .thumbnail }} + {{ $link := .url }} {{ $title := .title }} - {{ $author := .author }} - {{ $dateRaw := .pubDate }} + {{ $author := .author.name }} + {{ $dateRaw := .date_published }} {{ $date := dateFormat "January 2, 2006" $dateRaw }} - {{ $summary := .content | plainify | truncate 200 }} + {{ $summary := .content_html | plainify | truncate 200 }}
- Thumbnail for {{ $title }} + {{ $title }}
Posted {{ $date }}