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
Initialize Comments 时提示 Error: Validation Failed #66
Comments
看我的文章有解决方案 |
检查url是否存在问题,删除所有标题中的标点符号 |
When you click the button
But each label has a restriction of 50 chars, so the validation Failed message comes from the length of the url. So I solved the ploblem by copying the core js file to my project and modifying the variable |
我也遇到同样问题,发现英文文章题目初始化文本页没有问题,如果文章是中文标题,初始化就会报错。不知道具体原因? |
出现 我想到一个更好的方法,用文章的时间,这样长度是保证在50个字符内,完美解决! 具体原因可以查看我博客:http://ihtc.cc/2018/02/25/2018-02-25%20_Gitment评论功能接入踩坑教程/ |
在 themes\next\layout_third-party\comments 目录下修改gitments.swig,找到以下代码修改
之后重新hexo g -d就ok了,请保证没有浏览器缓存。 |
for hexo-theme-jane:
|
@mll120110 |
在外层的_config.yml 里把permalink: :year/:month/:day/:title/ 改成:year/:month/:day/:id/ 可以解决这个问题,原因是把标题编码后Label超过50. |
主题为:hexo-theme-next
原理是不加decodeURI时,生成的中文id会被转码为UTF-8格式,中文以%E1%A2这样的形式呈现,很容易超过github issue的长度限制,修改后,生成的id中文字符不转码。 |
文件名不能有标点符号,我加了一个.就不行了,和中英文标题没关系 |
No description provided.
The text was updated successfully, but these errors were encountered: