Use keyed each loops to avoid errors
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
66f702059c
commit
62212201a7
|
@ -28,7 +28,7 @@
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<ol class="years">
|
<ol class="years">
|
||||||
{#each groupPosts(data.posts).entries() as [year, posts]}
|
{#each groupPosts(data.posts).entries() as [year, posts] (year)}
|
||||||
<li>
|
<li>
|
||||||
<h2>{year}</h2>
|
<h2>{year}</h2>
|
||||||
<BlogPostList {posts} />
|
<BlogPostList {posts} />
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ol class="posts">
|
<ol class="posts">
|
||||||
{#each posts as post}
|
{#each posts as post (post.meta.slug)}
|
||||||
<BlogPost {post} {showYear} {showReadingTime} />
|
<BlogPost {post} {showYear} {showReadingTime} />
|
||||||
{/each}
|
{/each}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
Loading…
Reference in a new issue