DDEV giscus-comments
This repository uses GitHub Discussions to store user comments in DDEV via giscus.
Moderation
To moderate comments, visit the Discussions page, where you can filter by category.
How to integrate giscus with your website
-
Choose the repository
Ensure that the repository giscus will connect to meets the following requirements (This has already been done for
ddev/giscus-comments):- The repository is public, otherwise visitors will not be able to view the discussion.
- The giscus app is installed, otherwise visitors will not be able to comment and react.
- The Discussions feature is turned on by enabling it for your repository.
-
Create a discussion category
Create a new category with:
- A meaningful name
- A description that explains how the comments will relate to the repository
- The format set to
Open-ended discussion
-
Generate the giscus script
Visit giscus.app and configure:
- Repository:
ddev/giscus-comments - Page ↔️ Discussions Mapping: Select "Discussion title contains page
<title>" - Discussion Category: Choose the category created in step 2
- Features:
- Enable reactions for the main post
- Place the comment box above the comments
- Lazy-load the comments
- Theme: If your site supports automatic light/dark mode, choose
Preferred color scheme.
- Repository:
-
Embed the script to your website
For example, the following script is used for the ddev/addon-registry:
<script src="https://giscus.app/client.js" data-repo="<OWNER>/<REPO>" data-repo-id="<REPO_ID>" data-category="<CATEGORY_NAME>" data-category-id="<CATEGORY_ID>" data-mapping="title" data-strict="0" data-reactions-enabled="0" data-emit-metadata="0" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" data-loading="lazy" crossorigin="anonymous" async> </script> -
Enjoy with new comments integration