GithubHelp home page GithubHelp logo

Comments (9)

tiexo avatar tiexo commented on May 21, 2024

主题没适配的话就要手动添加代码了...

from gitalk.

mamboer avatar mamboer commented on May 21, 2024

@newdee 凹凸实验室的官网就是hexo的,也用Gitalk,你可以参考下,两个步骤:

  1. 建一个comment.swig页面片(有的话可以改下)

https://github.com/o2team/o2team.github.io/blob/v2/themes/lattice/layout/_partial/common/comment.swig

  1. 在你主题的配置文件里面加入gitalk的配置即可

https://github.com/o2team/o2team.github.io/blob/v2/themes/lattice/_config.yml#L35

from gitalk.

starlight02 avatar starlight02 commented on May 21, 2024

@mamboer 还是没有显示啊,都不知道改怎么办了

from gitalk.

newdee avatar newdee commented on May 21, 2024

@mamboer @FETE-CH @tiexo 恩,我花了点时间,自己移植到了hexo的Next主题上,其他的主题大同小异,凹凸实验室那个不大具有普遍性,直接这样改不大便于管理,而且很多主题是显示不出来的。具体过程见我的博客:
http://newdee.cf/posts/4da30c7/
不过貌似还是需要一篇篇的手动初始化?

from gitalk.

mamboer avatar mamboer commented on May 21, 2024

@newdee gitalk初始化的逻辑是:你打开页面的时候,如果已登录并且登录名在admin配置项内,就会自动初始化(不用手工点某个按钮)当前页面的评论。所以做不到一次性初始化所有的文章哈。

from gitalk.

newdee avatar newdee commented on May 21, 2024

@mamboer 对的,我明白你的意思,不过由于以前的文章比较多,所以有点麻烦,不过我还是手动初始化了的,毕竟这个还比较好看吧,以后写博客就方便一些了。不过还有个小问题,在博客主页会有个错误”index.js:18 Uncaught Error: Container not found, document.getElementById: gitalk-container“,这个应该是主页没有设置这个容器的,只是在评论系统里添加了,不知道为什么主页会有这个问题。。。

from gitalk.

ElderJames avatar ElderJames commented on May 21, 2024

我加入到了这个模版,详细看这个pr iblh/hexo-theme-material#554

from gitalk.

mamboer avatar mamboer commented on May 21, 2024

@newdee 你检查下主页是不是也把gitalk的js代码也加进去了,如果是的话需要检查下引入gitalk的写法是否合理。

from gitalk.

newdee avatar newdee commented on May 21, 2024

@mamboer 谢谢提醒,我当时也觉得是,但是感觉写的没问题,后来发现是忘记加判断comments了,还是当时不够仔细,原文已经修正
再次感谢Gitalk提供的帮助。

from gitalk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.