Using the Giscus blog comment feature
1분 미만
Using the Giscus blog comment feature
- Create a github repository to manage comments.
I made it with the name GiscusComment
.
Enter the created repo and enable General => Features =>
Discussions
.Then, the Discussions tab is added. Go in and click the 'pencil' in the Categories on the left and click 'New category'.
Set Category name: Comment, Discussion Format: Announcement and create it.
I will add Giscus app. I will select and add only the GiscusComment repository.
Enter Giscus setting page.
Enter username/comment-repo in the repository and change the Discussion category to Comment.
I haven't changed anything else, but you can change it if you like.
Copy the script part and paste it into the website template.
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.