moegi-design / ghost-theme-Moegi

An elegant & fresh ghost theme.
https://notes.ljl.li
164 stars 26 forks source link

新建导航栏后,点击浏览器console报错 #3

Closed ghost closed 6 years ago

ghost commented 6 years ago

我使用的是ghost版本是1.23,Moegi v1.0.0

bug复现步骤:

  1. 把一篇文章转成page
  2. Design-Navigation 添加一个导航。
  3. 打开网站主页,F12打开浏览器congsole,有报错信息。

报错信息如下:

jquery.min.js:2 Uncaught TypeError: e.indexOf is not a function
    at w.fn.init.w.fn.load (jquery.min.js:2)
    at t.(/ji-lu-flutter/anonymous function).(anonymous function)._create (https://cdn.bootcss.com/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js:4:951)
    at t.(/ji-lu-flutter/anonymous function).(anonymous function)._create (https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js:6:4499)
    at t.(/ji-lu-flutter/anonymous function).(anonymous function)._createWidget (https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js:6:6645)
    at new t.(/ji-lu-flutter/anonymous function).(anonymous function) (https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js:6:4063)
    at HTMLDivElement.<anonymous> (jquery-ui.min.js:6)
    at Function.each (jquery.min.js:2)
    at w.fn.init.each (jquery.min.js:2)
    at w.fn.init.t.fn.(/ji-lu-flutter/anonymous function) [as tocify] (https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js:6:5787)
    at (index):206

使用ghost默认主题没有此问题。

你可以通过我的网站查看这个问题:yikexiangcai.com 中有一个Bug的导航。

ghost commented 6 years ago

该问题在Ghost 后台补充代码注入后消失。(一直以只要上传了主题就可以使用的,谁知道还得必须配置代码注入)

ddiu8081 commented 6 years ago

@chengsixgoold 谢谢,这个问题我这里一直存在,我随后检查一下。

ProtegeZ commented 6 years ago

这个大概看了一下,主要是文章目录相关的tocify函数问题,但是这个函数是封装好的也不是很好解决。。

ddiu8081 commented 6 years ago

tocify插件年久失修,已经放本地魔改了。