Comments (9)
主题没适配的话就要手动添加代码了...
from gitalk.
@newdee 凹凸实验室的官网就是hexo的,也用Gitalk,你可以参考下,两个步骤:
- 建一个comment.swig页面片(有的话可以改下)
- 在你主题的配置文件里面加入gitalk的配置即可
https://github.com/o2team/o2team.github.io/blob/v2/themes/lattice/_config.yml#L35
from gitalk.
@mamboer 还是没有显示啊,都不知道改怎么办了
from gitalk.
@mamboer @FETE-CH @tiexo 恩,我花了点时间,自己移植到了hexo的Next主题上,其他的主题大同小异,凹凸实验室那个不大具有普遍性,直接这样改不大便于管理,而且很多主题是显示不出来的。具体过程见我的博客:
http://newdee.cf/posts/4da30c7/
不过貌似还是需要一篇篇的手动初始化?
from gitalk.
@newdee gitalk
初始化的逻辑是:你打开页面的时候,如果已登录并且登录名在admin
配置项内,就会自动初始化(不用手工点某个按钮)当前页面的评论。所以做不到一次性初始化所有的文章哈。
from gitalk.
@mamboer 对的,我明白你的意思,不过由于以前的文章比较多,所以有点麻烦,不过我还是手动初始化了的,毕竟这个还比较好看吧,以后写博客就方便一些了。不过还有个小问题,在博客主页会有个错误”index.js:18 Uncaught Error: Container not found, document.getElementById: gitalk-container“,这个应该是主页没有设置这个容器的,只是在评论系统里添加了,不知道为什么主页会有这个问题。。。
from gitalk.
我加入到了这个模版,详细看这个pr iblh/hexo-theme-material#554
from gitalk.
@newdee 你检查下主页是不是也把gitalk的js代码也加进去了,如果是的话需要检查下引入gitalk的写法是否合理。
from gitalk.
@mamboer 谢谢提醒,我当时也觉得是,但是感觉写的没问题,后来发现是忘记加判断comments了,还是当时不够仔细,原文已经修正
再次感谢Gitalk提供的帮助。
from gitalk.
Related Issues (20)
- 是否能够限定特定页面的gitalk只有自己可以评论。 HOT 1
- 支持 react 18 依赖组件更新 react-flip-move
- 未找到相关的 Issues 进行评论,如果用在文章里,每篇文章都需要手动开issue么?
- Gitalk Error:Not Found HOT 26
- hi
- Security issue HOT 1
- 未找到相关的 Issues 进行评论 请联系 @zelihole 初始化创建 HOT 14
- 无法构建
- 开通了讨论区 HOT 1
- Error: Bad credentials以及登录404问题 HOT 2
- Error: Validation Failed. HOT 1
- 項目已死!有事燒紙
- 1
- Gitalk UI doesn't respond to keyboard on Firefox
- Unfocus when keyup HOT 1
- Grammerly making the comment text box unfocus.
- 服务器炸了,该充钱了 HOT 3
- Gitalk没有深色是故意的还是不小心的 HOT 1
- Bundle size 2MB? Seriously?
- hexo搭载gittalk如何做到不同文章评论区互不干扰,目前来看评论会在多个地址同时出现 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitalk.