How to add user comments?



Page comments can be setup with any one of the following supported providers:

  1. giscus
  2. utterances
  3. disqus

Each provider has it's own configuration options that you should add to your .env file.


If you are hosting your website on hosting providers like Netlify, Vercel or Cloudflare, you will also need to add the environment variables there.


Giscus uses your github repo's discussions feature to store your comments and display them on your site.


  1. You have a public github repository with the discussions feature activated which will be used to store your comments.
  2. The giscus app installed in your repo by following their configuration setup at

Once the above steps are completed, head over to and follow the steps there by filling out the fields to get your config values.


Make sure to choose pathname under page discussions mapping.

After filling out the fields, you will be provided with a script tag that contains your config values. Add them to your .env file, like so:


When a user visits a web page, Giscus searches for a discussion whose title contains the page's pathname URL component. If there are no matches (i.e., no comments have been made about that page), then a new discussion is created for that page.

By using the pathname for mapping with a page, Giscus ensures that each discussion is unique to a particular page and that comments made on that page are kept together.

More info on how this connection is achieved can be found on their 'how it works' section in their repo - and also in the 'Page Discussions Mapping' section at


Utterances uses your github repo's issues to store comments for your pages and display them on your site. To setup comments with utterances, you would need to do the following:


  1. You have a public github repository
  2. The utterances app installed in your repo by following their configuration setup at

Once installed fill in the required fields and you will see a script tag with your repo value which you can add to your .env file, like so:



Disqus is a feature rich provider which can be used to add comments to your site. You can configure flowershow to use disqus by creating an account on their site and following their process. You will be asked to enter a shortname for your site. Once completed, we can use this shortname in our comments configuration as below.


  1. Create an account on Disqus and follow their setup process.

You will be asked to enter a shortname for your site. Add it to your .env file as well, like so:


Add comments to your page layout

You can use @portaljs/core to import the comments section component. Install it with:

npm i @portaljs/core

Then, add the following to your custom layout (or directly to your pages):

import Navbar from './navbar';
import Footer from './footer';

export default function Layout({ children }) {
  return (
      <Navbar />
        <Comments commentsConfig={commentsConfig} slug={urlPath} />
      <Footer />