From e84c4d43ecace7eff816e4a380c2fff8e3784dbd Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Mon, 2 May 2022 11:57:46 -0400 Subject: [PATCH] Added shortcode for displaying mastodon toots --- layouts/shortcodes/displayToots.html | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 layouts/shortcodes/displayToots.html diff --git a/layouts/shortcodes/displayToots.html b/layouts/shortcodes/displayToots.html new file mode 100644 index 0000000..a550bb9 --- /dev/null +++ b/layouts/shortcodes/displayToots.html @@ -0,0 +1,36 @@ +{{ $suburl := .Get 0 }} +{{ $url := print .Site.BaseURL $suburl}} +{{ $dataJ := getJSON $url }} + + + +{{ range $dataJ }} +{{ if ne .content "" }} +
+
+
+ + {{ .content | safeHTML }} +
+
+
+ {{ .replies_count }} + {{ .reblogs_count }} + {{ .favourites_count }} +
+
+{{ end }} +{{ end }}