InkProject / ink

An elegant static blog generator

Home Page:https://inkproject.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何在默认主题添加Instantclick啊?

tominysun opened this issue · comments

我实验了好几次都不行,点击后无法加载正常网页。
这是我用的代码:
`<script src="//huangwuwen.firadio.net/ink/bundle/instantclick.min.js?v=3.1.0" data-no-instant></script>

<script data-no-instant>InstantClick.init();</script>`

@jiangxu1 一般来说脚本加在 theme/page.htmltheme/article.html 模板页中 </body> 的前面就可以,然后重新 build。

感谢,已修改成功。
但是又出现一个问题,我尽可能把所有用到的JS都加上了data-no-instant
但是在加载过程中,网页底部输出年份的JS失效了(© XX 2017),这个该怎么解决啊??

@jiangxu1 年份部分是JS动态生成的,我想 instant click 是直接加载的静态 html,这部分也许可以参考下
instant click 文档,等页面加载完成后,再去调用下代码;或者把年份直接写死。

好的,已解决,感谢!(就是直接写死。。。)