Skip to content

How to integrate Giscus comment configuration #396

@hubianluanma

Description

@hubianluanma

Hello, I would like to integrate the Giscus comment component. I have already generated a script and made modifications in themes/mailroad/layouts/sections/comments. html:

<section class="comments">
    {{- if and (index .Params "comments" | default true) (not hugo.IsServer) }}
    <script src="https://giscus.app/client.js"
        data-repo="hubianluanma/hubianluanma.github.io"
        data-repo-id="******************"
        data-category="Announcements"
        data-category-id="***********************"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="bottom"
        data-theme="preferred_color_scheme"
        data-lang="zh-CN"
        crossorigin="anonymous"
        async>
	</script>
	{{- end }}
</section>

But when I deployed it, there was no comment box displayed. May I ask where the problem lies.
Looking forward to your reply, thank you!!!😁

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions