Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
floatingpurr committed Oct 4, 2024
2 parents 5df0c7e + c11b2a2 commit 6d7457b
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 73 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
app:
image: node:18
image: node:20
ports:
- 4321:4321
working_dir: /app
Expand Down
140 changes: 70 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

```diff
+ import Comments from "@components/Comments";

<ShareLinks />
</div>

+ <Comments client:only />
+ <Comments client:only="react" />

</main>
<Footer />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/posts/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { SITE } from "@config";
import Posts from "@layouts/Posts.astro";
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import getSortedPosts from "@utils/getSortedPosts";
export const getStaticPaths = (async ({ paginate }) => {
const posts = await getCollection("blog", ({ data }) => !data.draft);
return paginate(posts, { pageSize: SITE.postPerPage });
return paginate(getSortedPosts(posts), { pageSize: SITE.postPerPage });
}) satisfies GetStaticPaths;
const { page } = Astro.props;
Expand Down
16 changes: 16 additions & 0 deletions src/pages/posts/[page].astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import { SITE } from "@config";
import Posts from "@layouts/Posts.astro";
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import getSortedPosts from "@utils/getSortedPosts";
export const getStaticPaths = (async ({ paginate }) => {
const posts = await getCollection("blog", ({ data }) => !data.draft);
return paginate(getSortedPosts(posts), { pageSize: SITE.postPerPage });
}) satisfies GetStaticPaths;
const { page } = Astro.props;
---

<Posts {page} />

0 comments on commit 6d7457b

Please sign in to comment.