Featured image of post hugo增加utterances功能

hugo增加utterances功能

utterances评论区

|
Document-edit Created with Sketch.
|

Hugo在个人网站增加评论区的功能

Step1 :打开hugo主目录(前提已经部署好)

主目录.png

Step2 :打开hugo.yaml配置文件,移到comments:

    comments:
        enabled: true
        provider:   utterances

        disqusjs:
            shortname:
            apiUrl:
            apiKey:
            admin:
            adminLabel:

        utterances:
            repo: allergicrosen/myblog
            issueTerm: pathname
            label:

        beaudar:
            repo:
            issueTerm: pathname
            label:
            theme:

        remark42:
            host:
            site:
            locale:

        vssue:
            platform:
            owner:
            repo:
            clientId:
            clientSecret:
            autoCreateIssue: false

确保

    enabled: true
    provider:   utterances

其它的不用可以删掉,保留

    utterances:
        repo: GitHub名字/静态网页仓库名字(一定注意仓库名字后面什么都不要加)
        issueTerm: pathname

Step3 :为你所需要的仓库配置utterances

打开链接https://github.com/apps/utterances

1

登录验证,按照提示操作,选择所需仓库进行安装2

完毕后检查是否安装:所需仓库->Settings->Integrations->Github Apps里可以看到utterances。

3

Step4 :重新生成public(hugo.exe在主目录)

./hugo.exe server-D

此时应该已经成功了。

Licensed under CC BY-NC-SA 4.0 转载请留言告知
最后更新于 Apr 16, 2025 05:19 UTC
使用 Hugo 构建
主题 StackJimmy 设计
本博客已稳定运行