Add Giscus to A Blog In A Private GitHub Repository
Tutorial on how to add Giscus to a blog which is hosted in a private GitHub repository.
Flo
The key to enabling Giscus comments to your blog in a private GitHub repository is creating another GitHub repository dedicated to the comments which is public. The inspiration for this idea I found in this post.
Steps
For it to work, follow these steps:
- Create a new public repository (e.g /flosblog-comments)
- Go to the Giscus Homepage
- Fill out the form on the website
- Copy the resulting script tag to your blogs template page
Example of a script tag
<script src="https://giscus.app/client.js" data-repo="devbf/flosblog-comments" data-repo-id="R_kgDOO3W3Mw" data-category="Announcements" data-category-id="DIC_kwDOO3W3M84CrIVq" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="top" data-theme="purple-dark" data-lang="en" data-loading="lazy" crossorigin="anonymous" async></script>
You Might Also Like
Why I started this blog and what my current blogging process looks like
This post goes into detail why I started my blog to publish summaries of interesting books, articles, podcasts or audiobooks I consume.
#blog
Adding Code Previews To Astro
This are the steps I took to add code previews to my .mdx files in Astro.
#tutorial
Script For Recurring Chores in Home Assistant
This script creates tasks for your chores and sends notifications.
#tutorial