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.

  1. Create a new public github repository with discussions enabled
  2. Install the giscus github application and grant access to that repository
  3. Open giscus.app
  4. Change the settings like you want them to be! I recommend using the light theme, unless you have custom CSS in your blog.
  5. 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 :)

  6. 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.