-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add PJAX require LazyLoad scrollReaveal gittalk share password #616
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems your NexT version is too old. Need to update from last master and make changes of this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pjax,很期待这个新功能加入,但能否在最新的master分支上重做,因为部分你提交的部分功能已经实现了
另外,单个PR尽量对应一个功能,Codacy提到的代码质量问题也需要注意下 😉
纠正一下,虽然里面的很多功能已经实现了,可是我把这些功能加进去,是因为原来已经有的功能需要适配pjax,所以原来的那些功能并不是多余的。 |
针对在master分支重新提交代码,因为最近有其他的事情要做,所以暂时不考虑,以后可能会。 |
</div> | ||
<div id="aplayer"></div> | ||
{# 这个只能通过这里加载,因为RequireJS 介绍说一个JS文件里只能放一个Define,这个众所周知,不提。#} | ||
<script type="text/javascript" src="/dist/APlayer.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
比如:这块内容是APlayer?也与pjax有关么?
如果不是的,建议去掉
毕竟现在2.7w+的代码改动,应该没人敢合 😰
pjax may introduce too many changes to NexT and influence those users who don't want pjax. |
Superseded by #1024 |
英文:Some netizens left comments on my blog, hoping to pull pjax and other functions on github. Today, I tried to do so, and I hope the authorities can agree, so as to help more people. Thank you.
Functions added:
pjax
The require. Js
The lazyLoad
scrollReaveal
gittalk
share
password
Major code changes:
_layout. Swig
Source /js/ SRC (I wrote some js myself, and there are comments in these js)
Pjax core js:
Source/js/SRC/pjax/pjaxMain js
Just to be clear: someone sent an email saying that the place where I submitted pr has been out of maintenance for a long time, so I submitted it here. He also said that "gitalk and lazyload have been implemented, as long as they are enabled in the configuration, I don't know whether the part you submitted is redundant or not. Just to be clear, this is something I know hexo next has been implemented before, but this time I'm mostly submitting pjax functionality, so I'm submitting these again and I'm not throwing code at it all at once, because I'm fusing gitalk and lazyload into pjax as well, and I can comment out the corresponding code if I don't feel the need.
My own post on next pjax:
https://blog.csdn.net/dataiyangu/article/details/84351467
https://mmmmmm.me/hexo_yi_pjax.html
There are errors in the code, I hope the majority of users.
中文:
有网友在我的博客留言希望将pjax等功能在github进行pull request,今天,我对此进行了尝试,希望官方同意,以此帮助更多的人,谢谢。
加入的功能:
pjax
require.js
lazyLoad
scrollReaveal
gittalk
share
password(博文加密)
主要修改代码的地方:
_layout.swig
source/js/src(自己写了一些js,在这些js中都有注释)
pjax的核心js:
source/js/src/pjax/pjaxMain.js
声明一下:有人发邮件说我原来提交pr的地方已经很久不维护了,所以提交到这里,他还说“gitalk 以及 lazyload 已经有了实现,只要在配置里启用即可,你提交的部分不知是否多余。”这里声明一下,这些我当然知道之前hexo next已经实现,但是这次我主要提交的是pjax功能,所以我再次提交这些功能并不是一股脑的把代码扔过来,因为我将gitalk和lazyload也融合到pjax中,如果感觉没有必要,可以将相应的代码注释掉。
我自己写的next pjax的博文:
https://blog.csdn.net/dataiyangu/article/details/84351467
https://mmmmmm.me/hexo_yi_pjax.html
代码中有错误的地方,希望广大的网友提出。