Skip to content

Commit 6d7457b

Browse files
committed
Fix conflicts
2 parents 5df0c7e + c11b2a2 commit 6d7457b

File tree

5 files changed

+93
-73
lines changed

5 files changed

+93
-73
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
app:
5-
image: node:18
5+
image: node:20
66
ports:
77
- 4321:4321
88
working_dir: /app

package-lock.json

Lines changed: 70 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/blog/how-to-integrate-giscus-comments.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
author: FjellOverflow
33
pubDatetime: 2024-07-25T11:11:53Z
4+
modDatetime: 2024-09-25T12:07:53Z
45
title: How to integrate Giscus comments into AstroPaper
56
slug: how-to-integrate-giscus-comments
67
featured: true
@@ -189,10 +190,12 @@ Note that specifying a `theme` here will override the `lightTheme` and `darkThem
189190
To complete the process, add the new Comments component to `src/layouts/PostDetails.astro` (replacing the `script` tag from the previous step).
190191

191192
```diff
193+
+ import Comments from "@components/Comments";
194+
192195
<ShareLinks />
193196
</div>
194197

195-
+ <Comments client:only />
198+
+ <Comments client:only="react" />
196199

197200
</main>
198201
<Footer />

src/pages/posts/[...page].astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import { SITE } from "@config";
33
import Posts from "@layouts/Posts.astro";
44
import type { GetStaticPaths } from "astro";
55
import { getCollection } from "astro:content";
6+
import getSortedPosts from "@utils/getSortedPosts";
67
78
export const getStaticPaths = (async ({ paginate }) => {
89
const posts = await getCollection("blog", ({ data }) => !data.draft);
9-
return paginate(posts, { pageSize: SITE.postPerPage });
10+
return paginate(getSortedPosts(posts), { pageSize: SITE.postPerPage });
1011
}) satisfies GetStaticPaths;
1112
1213
const { page } = Astro.props;

src/pages/posts/[page].astro

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
import { SITE } from "@config";
3+
import Posts from "@layouts/Posts.astro";
4+
import type { GetStaticPaths } from "astro";
5+
import { getCollection } from "astro:content";
6+
import getSortedPosts from "@utils/getSortedPosts";
7+
8+
export const getStaticPaths = (async ({ paginate }) => {
9+
const posts = await getCollection("blog", ({ data }) => !data.draft);
10+
return paginate(getSortedPosts(posts), { pageSize: SITE.postPerPage });
11+
}) satisfies GetStaticPaths;
12+
13+
const { page } = Astro.props;
14+
---
15+
16+
<Posts {page} />

0 commit comments

Comments
 (0)