all repos — blog @ 6d86d6e079543f35c2390091db4339779899f401

Code and content for 5ika.ch

Show all bookwyrm items
Tim Izzo tim@5ika.ch
Tue, 08 Sep 2026 06:55:04 +0200
commit

6d86d6e079543f35c2390091db4339779899f401

parent

aa659112741b5963c190224bb0cd5d6e2d6dd91b

1 files changed, 18 insertions(+), 14 deletions(-)

jump to
M layouts/shortcodes/books.htmllayouts/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 }}