Comments with giscus.app
Hi! I wanted to add comments to my writefreely blog and it was quite easy. Here are the steps for it.
- Create a new public github repository with discussions enabled
- Install the giscus github application and grant access to that repository
- Open giscus.app
- Change the settings like you want them to be! I recommend using the
lighttheme, unless you have custom CSS in your blog.
You might experience problems when trying to copy-paste the script to writefreely blog customization. For security writefreely sanitizes any
<script>tags. However we can use a workaround:
Place the following code to the custom CSS section
</style> script here <style type="text/css">
It will throw syntax errors in the editor, but you can ignore those. It will still work :)
And now the script should load. To get the comment section placed correctly you will need to include at the end of a blog post.
<div class="giscus" ></div>
Without this giscus will create the comment section in the
<head>tags which can be useful if you want to hide it for specific posts.