Integrating GraphComment to Wowchemy Static Website
This article summarizes the steps I have followed to add comments to my static website using GraphComment. My choice to go with GraphComment primarily is due to two following reasons:
- It has a free basic plan, which is immensely useful for a technical website such as this which hardly expects heavy traffic.
- This being a European based company, they will comply with GDPR regulations.
Now I will list down the steps I have followed for integrating this service with the wowchemy theme built using Hugo.
- First, go to the GraphComment website and create your account.
- Next select add a new website option. Enter the Site Name (it is just a label/tag to choose the specific website from the list if in case you have many websites), Unique ID (this is the ID you will be using later in wowchemy theme files to link the website), Website URL (this is the website to which you want to add comment system, e.g. www.example.com), Website Preferred Language (enter your prefered language, I have used English). I have skipped Whitelist domains. Then save the data.
- Next click on your site name under My Sites. Then select SETUP and then Universal Code. Scroll below the page and copy the HTML code.
- Next head into directories of your wowchemy source files. Create the following folders/subfolders if they are not present there already: \starter-hugo-academic\layouts\partials\comments
- Create graphcomment.html file and paste the code copied in step 3.
- Then head to the params.yaml file in \starter-hugo-academic\config_default
- Scroll to the comments section then enter graphcomment in provider i.e., provider: ‘graphcomment’
- You can customize to which pages the comments should appear.
That’s it you are good to go.