{{/* vim: ft=gohtmltmpl: */}} {{ $tweets := slice }} {{ with resources.Get "twitter/tweets.json" }} {{ with . | transform.Unmarshal }} {{ $tweets = . }} {{ end }} {{ end }} {{ range $tweets }} {{ $tweet := .tweet }} {{ $content := dict "mediaType" "text/markdown" "value" (partial "twitter/assembleTweetMarkdown.html" $tweet) }} {{ $creationDate := partial "twitter/parseCreatedAtDate.html" $tweet.created_at }} {{ $title := printf "Tweet on %s" (time.Format "2 January 2005" $creationDate) }} {{ $path := printf "%s/%s" $creationDate.Year $tweet.id_str }} {{ $dates := dict "date" $creationDate }} {{ $params := dict "favoriteCount" $tweet.favorite_count "retweetCount" $tweet.retweet_count }} {{ $page := dict "title" $title "dates" $dates "content" $content "kind" "page" "params" $params "path" $path }} {{ $.AddPage $page }} {{ end }}