Skip to content

Commit c9678fc

Browse files
committed
og_image: Improve template rendering with proper block layout for tags and authors
1 parent 7efa959 commit c9678fc

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
Loading

crates/crates_io_og_image/template/og-image.typ

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,14 @@
262262

263263
// Tags
264264
if data.at("tags", default: ()).len() > 0 {
265-
for (i, tag) in data.tags.enumerate() {
266-
if i > 0 {
267-
h(3pt)
265+
block(
266+
for (i, tag) in data.tags.enumerate() {
267+
if i > 0 {
268+
h(3pt)
269+
}
270+
render-tag(text(size: 8pt, weight: "medium", "#" + tag))
268271
}
269-
render-tag(text(size: 8pt, weight: "medium", "#" + tag))
270-
}
271-
linebreak()
272+
)
272273
}
273274

274275
// Description
@@ -284,7 +285,7 @@
284285
}
285286
(name: author.name, avatar: avatar)
286287
})
287-
render-authors-list(authors-with-avatars)
288+
block(render-authors-list(authors-with-avatars))
288289
}
289290

290291
place(bottom + left, float: true,

0 commit comments

Comments
 (0)