Skip to content

Commit fec6179

Browse files
Fix: Blog carousel and multi-author support
This commit addresses a regression where the 'latest posts' carousel was empty. This was caused by a recent change to support multiple authors, where the `authorId` field was replaced with `authorIds`. The carousel has been updated to check for both `authorId` and `authorIds` to ensure all posts are displayed correctly. This also includes the initial multi-author support changes: - The `layouts/partials/blog-meta.html` template is updated to handle an `authorIds` array in the front matter. It maintains backward compatibility with the old `authorId` field. - All existing blog posts have been migrated to use the new `authorIds` field.
1 parent d4b0da4 commit fec6179

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/partials/blog-carousel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="carousel-inner">
33
{{ $posts := where .Site.Pages "Section" "blog" }}
44
{{ range $index, $page := $posts }}
5-
{{ if .Params.authorId }}
5+
{{ if or (isset .Params "authorId") (isset .Params "authorIds") }}
66
<div class="carousel-item {{ if eq $index 0 }}active{{ end }}">
77
<div class="card">
88
<div class="card-body card-body-shadow">

0 commit comments

Comments
 (0)