Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add giscus support #92

Merged
merged 4 commits into from
Sep 26, 2023
Merged

feat: add giscus support #92

merged 4 commits into from
Sep 26, 2023

Conversation

iju707
Copy link
Contributor

@iju707 iju707 commented Sep 26, 2023

feat: #89

add giscus support.
There are other comment service, so I created it using comment.type.

in hugo.yml

params:
  comment:
    enable: true
    type: giscus
    giscus:
      dataRepo: data-repo parameter
      dataRepoId: data-repo-id parameter
      dataCategory: data-category parameter
      dataCategoryId: data-category-id parameter
      dataMapping: data-mapping parameter (default pathname)
      dataLang: data-lang parameter (default en)

add components/comment partial in all list/single page, except list page in blog.

if some page want to disable comment, use comment: false in front matter.

---
title: test page
comment: false
---

@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 75fbca4
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/6513351c2c91c80008572efb
😎 Deploy Preview https://deploy-preview-92--hugo-hextra.netlify.app
📱 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.

@iju707 iju707 changed the title feat: add giscus support #89 feat: add giscus support Sep 26, 2023
@imfing
Copy link
Owner

imfing commented Sep 26, 2023

thanks for the PR, it looks great overall!

I have a few small suggestions on the configuration:

params:
  comment:
    enable: true
    type: giscus

    giscus:
      repo: data-repo parameter
      repoId: data-repo-id parameter
      category: data-category parameter
      categoryId: data-category-id parameter
      mapping: data-mapping parameter (default pathname)
  • remove data prefix for the giscus parameters
  • remove lang setting, replace with the site language code, so it works with multilingual site

@imfing imfing merged commit 6a19ac3 into imfing:main Sep 26, 2023
4 checks passed
@imfing
Copy link
Owner

imfing commented Sep 26, 2023

Thanks, merged! We also need to add documentation and example settings in separate PR

@imfing imfing mentioned this pull request Sep 26, 2023
@iju707 iju707 deleted the feat-giscus branch September 26, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants