gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

comments added #201

Closed mansoorbarri closed 11 months ago

mansoorbarri commented 11 months ago

fixes #123 Uses https://utteranc.es/ to allow comments on posts via GitHub issues.

Files amended:

preview: https://gokarna.mansoorbarri.com

netlify[bot] commented 11 months ago

Deploy Preview for gokarna-hugo ready!

Name Link
Latest commit 00547663344c2bed9c507e7a5236e4ddabb75c68
Latest deploy log https://app.netlify.com/sites/gokarna-hugo/deploys/65487235eeabd60008f22286
Deploy Preview https://deploy-preview-201--gokarna-hugo.netlify.app/posts/theme-documentation-advanced
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

yashmehrotra commented 11 months ago

@mansoorbarri I don't think we should lock users down to a single comments platform, and support all the current multiple ones is a nightmare (Also utterances seems to be a bad choice because it requires a github ID to participate)

We have https://gokarna-hugo.netlify.app/posts/theme-documentation-advanced/#custom-head-and-footer-html for the exact reason

Maybe we can add customCommentHTML as a param since allowing comments on homepage, tags and post list page does not make sense

@526avijitgupta thoughts ?

mansoorbarri commented 11 months ago

true but having it via GitHub limits who can comment which can be a good thing since unhinged comments section would just invite spam. Additionally, there is param option available for anyone who doesn't want comments with utterances.

also, I did not understand what you meant by

Maybe we can add customCommentHTML as a param since allowing comments on homepage, tags and post list page does not make sense

yashmehrotra commented 11 months ago

true but having it via GitHub limits who can comment which can be a good thing since unhinged comments section would just invite spam. Additionally, there is param option available for anyone who doesn't want comments with utterances.

No, because:

  1. Not everyone in the tech domain has a GitHub account (A lot of people migrated away from GitHub due to controversies)
  2. People who do not code definitely do not have a GitHub account

Due to this, other users would want to add their preferred commenting platform (commento, disqus, remark42 etc.)

Once we open that gate, we will end up maintaining 10+ comment platforms, which is not what we want

also, I did not understand what you meant by

Maybe we can add customCommentHTML as a param since allowing comments on homepage, tags and post list page does not make sense

So, we have a customHeadHTML and customFooterHTML, we can create a customCommentHTML param so that you can just do

# config.toml

customCommentHTML =    """<script src="https://utteranc.es/client.js"
        repo="repoName"
        issue-term="title"
        theme="github-dark"
        crossorigin="anonymous"
        async></script>"""
mansoorbarri commented 11 months ago

true makes sense, I'll update.

yashmehrotra commented 11 months ago

@mansoorbarri Thanks for the changes

Few things:

  1. Document this in the advanced theme section
  2. Put this in a comments div which users can customize with external css if required
  3. I'm not sure why, but this is not being rendered in the netlify preview, please have a look at that as well
mansoorbarri commented 11 months ago

i''m not sure why netlify wasn't working but its up to date now.