imsun / gitment

A comment system based on GitHub Issues.
https://imsun.github.io/gitment/
MIT License
4.06k stars 347 forks source link

请问如何集成至Hugo? #124

Open Honghe opened 6 years ago

Honghe commented 6 years ago

如题,谢谢! (虽然Issue这不是提问的地方)

qytang326 commented 6 years ago

改一下参数就好 这是我设置的参数:

var gitment = new Gitment({
              id: '{{ .File.BaseFileName }}', /* 页面ID,可选。默认为 location.href */
              owner: '{{ .Site.Params.gitment.github_username }}', /* 你的 Github ID */
              repo: '{{ .Site.Params.gitment.repo_for_gitment }}', /* 存储评论的 repo */
              title: '{{ .Title }}',/*issue页的标题 */
              oauth: {
                client_id: '{{ .Site.Params.gitment.oauth_client_id }}', /*你的 client ID */
                client_secret: '{{ .Site.Params.gitment.oauth_client_secret }}', /*你的 client secret */
              },
})

相关的带.Site的参数在config里设定,其他的不动就好