Show all bookwyrm items
Tim Izzo tim@5ika.ch
Tue, 08 Sep 2026 06:55:04 +0200
1 files changed,
18 insertions(+),
14 deletions(-)
jump to
M
layouts/shortcodes/books.html
→
layouts/shortcodes/books.html
@@ -1,18 +1,22 @@
<div style="margin-top:2rem"> - {{ $outbox := dict }} - {{ with resources.GetRemote "https://bookwyrm.social/user/5ika/outbox?page=1" }} - {{ $outbox = . | transform.Unmarshal }} - {{ range $outbox.orderedItems }} - {{ if hasPrefix .content "<p>" }} - <div> - <a href='{{ .inReplyToBook }}' target="_blank"> - {{ with index .attachment 0 }} - {{ (replaceRE ` \(.*?\)` "" (replaceRE `^(.*):` "<strong>$1</strong>" .name)) | safeHTML }} - {{ end}} - </a> - <div style="margin-top:8px"><span class='date'>{{ dateFormat "2 Jan 2006" .published }}</span></div> - <blockquote>{{ (replaceRE `<p>\(comment on .*</p>` "" .content) | safeHTML}}</blockquote> - </div> + {{ $pages := slice 1 2 3 4 }} + {{ range $pages }} + {{ $outbox := dict }} + {{ $url := printf "https://bookwyrm.social/user/5ika/outbox?page=%d" . }} + {{ with resources.GetRemote $url }} + {{ $outbox = . | transform.Unmarshal }} + {{ range $outbox.orderedItems }} + {{ if hasPrefix .content "<p>" }} + <div> + <a href='{{ .inReplyToBook }}' target="_blank"> + {{ with index .attachment 0 }} + {{ (replaceRE ` \(.*?\)` "" (replaceRE `^(.*):` "<strong>$1</strong>" .name)) | safeHTML }} + {{ end}} + </a> + <div style="margin-top:8px"><span class='date'>{{ dateFormat "2 Jan 2006" .published }}</span></div> + <blockquote>{{ (replaceRE `<p>\(comment on .*</p>` "" .content) | safeHTML}}</blockquote> + </div> + {{ end }} {{ end }} {{ end }} {{ end }}