Skip to content

feat: 增加评论区 - #1

Merged
tyza66 merged 1 commit into
mainfrom
feat/giscus-comments
Aug 8, 2026
Merged

feat: 增加评论区#1
tyza66 merged 1 commit into
mainfrom
feat/giscus-comments

Conversation

@tyza66

@tyza66 tyza66 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 8, 2026 09:56
@tyza66
tyza66 merged commit 433d346 into main Aug 8, 2026
1 check passed
@tyza66
tyza66 deleted the feat/giscus-comments branch August 8, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comment section to the Hugo site by enabling PaperMod’s comments flag and overriding the theme’s comments.html partial to embed Giscus.

Changes:

  • Added a new layouts/partials/comments.html that embeds Giscus via giscus.app/client.js.
  • Enabled global comments via params.comments = true in hugo.toml.
  • Introduced a new layouts/_default/list.html override that injects the comments partial on non-home, non-about list pages.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
layouts/partials/comments.html Overrides theme comments partial to render Giscus.
layouts/_default/list.html Overrides PaperMod list template and adds comments rendering on list pages.
hugo.toml Enables comments globally via params.comments = true.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +119 to +121
{{- if and (not .IsHome) (ne .Section "about") }}
{{- partial "comments.html" . }}
{{- end }}
Comment on lines +7 to +11
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
Comment on lines +2 to +6
<script src="https://giscus.app/client.js"
data-repo="tyza66/Blog"
data-repo-id="R_kgDOREy3Cw"
data-category="General"
data-category-id="DIC_kwDOREy3C84DC7fE"
Comment thread hugo.toml
Comment on lines 6 to +8
[params]
author = 'tyza66'
comments = true
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.

2 participants