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

GitHub限制label长度导致gitment/gitalk可能无法创建issue #622

codgician opened this issue Mar 9, 2018 · 4 comments


Copy link

@codgician codgician commented Mar 9, 2018

I certify that I have first consulted (check all with "x")

我确认我已经查看了 (使用 "x" 选择)

I'm submitting a (check one with "x")

我正在申请 (使用 "x" 选择)

  • bug report | 反馈一个 bug
  • feature request | 申请添加新的特性或功能
  • support request | 请求技术支持

由于 GitHub 最近限制 label 长度为 50 字符以内,导致对于 url 过长的文章无法创建相应 label,因此无法初始化评论。

详细情况可以参见 Issue #102 - gitalk/gitalk

可行的解决方案之一是使用 url 的 md5 作为 label,但是这样会导致用户需要手动在 GitHub 上修改之前所有文章对应的 label。

Recently GitHub has decided to limit the length of label name to no more than 50 characters, so that creating label may fail when the length of url exceeds 50 characters while using gitment / gitalk as comment system.

For further details, please check out Issue #102 - gitalk/gitalk.

One possible solution is using md5 hash of url as label name, but this will require users to manually change label names for previous posts.


This comment has been minimized.

Copy link

@NewGr8Player NewGr8Player commented Mar 15, 2018


<script src=""></script>


<!-- Gitalk 评论框 -->
<div id="gitalk-container"></div>

<link rel="stylesheet" href="">

<script src=""></script>
<script src=""></script>

    var gitalk = new Gitalk({
            clientID: '<%= theme.comment.gitalk_client_id %>',
            clientSecret: '<%= theme.comment.gitalk_client_secret %>',
            repo: '<%= theme.comment.gitalk_repo %>',
            owner: '<%= theme.comment.gitalk_owner %>',
            admin: ['<%= theme.comment.gitalk_owner %>'],
            id: md5(window.location.pathname),
            // facebook-like distraction free mode
            distractionFreeMode: false



This comment has been minimized.

Copy link

@Hiwensen Hiwensen commented May 23, 2018

@NewGr8Player 谢谢给出的解决方案, 简便好用


This comment has been minimized.

Copy link

@ElderJames ElderJames commented May 26, 2018


ElderJames added a commit to ElderJames/hexo-theme-material that referenced this issue Jun 6, 2018

This comment has been minimized.

Copy link

@ElderJames ElderJames commented Jun 6, 2018

已提pr修复此问题 #664 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.