Skip to content

Commit

Permalink
medium rss changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Dec 6, 2023
1 parent 28220ea commit e8bd322
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions layouts/shortcodes/blog.html
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -18,7 +16,7 @@ <h3 class="blog-header">
{{ $img := .thumbnail }}
{{ $title := .title }}
{{ $author := .author }}
{{ $dateRaw := .pubDate }}
{{ $dateRaw := .date_published }}
{{ $date := dateFormat "January 2, 2006" $dateRaw }}
{{ $summary := .content | plainify | truncate 200 }}
<div class="col-lg-4 mb-5 mb-lg-0 text-center ">
Expand Down

0 comments on commit e8bd322

Please sign in to comment.