본문으로 건너뛰기

Using the Giscus blog comment feature

O-h-y-o1분 미만

Using the Giscus blog comment feature

  1. Create a github repository to manage comments.

I made it with the name GiscusComment.

  1. Enter the created repo and enable General => Features => Discussions.

  2. Then, the Discussions tab is added. Go in and click the 'pencil' in the Categories on the left and click 'New category'.

  3. Set Category name: Comment, Discussion Format: Announcement and create it.

  4. I will add Giscus app. I will select and add only the GiscusComment repository.

  5. Enter Giscus setting page.

  6. Enter username/comment-repo in the repository and change the Discussion category to Comment.

  7. I haven't changed anything else, but you can change it if you like.

  8. Copy the script part and paste it into the website template.

  9. If you are using vuepress home theme like me, please do the following.

// theme.ts
export default hopeTheme({
  plugins: {
    comment: {
      provider: "Giscus",
      repo: "data-repo",
      repoId: "data-repo-id",
      category: "data-category",
      categoryId: "data-category-id",
      comment: true,
      mapping: "pathname",
      strict: false,
    },
  },
});

Just make sure the comment window pops up.