-
Notifications
You must be signed in to change notification settings - Fork 2k
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
About the loading of some third-party libraries #655
Comments
I think it would be better to externalize all the optional libs, including their dependencies and code. My proposal: This would be a breaking change, but it can really improve types of commits to this repo. |
|
@maple3142 Agree, git-submodule is a good idea.
|
Maybe checkout a new branch such as dev, do the huge job over there, if it's good enough then we can merge to master, also many docs need to update. |
I think if possible, once cloning is enabled automatically. And they have their own configuration files that we can custom. Or overwrite it in the main configuration file. Can it be achieved through events? |
@ivan-nginx How do you think? Many |
@stevenjoezhang Oh, it's a little bit hard, I agree. But we need for provide end-user to choose what he want tu use: CDN or local files. Because in own server-use cases local files can joined into 1 request via HTTP2 protocol and site will load faster. |
Ok, let's I show my vision on it. Issue 1: About mermaid and mathjax
Yes, we should.
Yes, we should.
I think in the distant future we can cutted out jQuery totally. Issue 2: About the loading of pdf and mathjax
I think u already get the solution for this. Issue 3: _third_party?
Yes, wiser will be to do that. In previous your PR I just talking about: no need to join Features & Bugfixes & Optimizations at once because if we will want to revert PR, PR will be reverted with all changes.. If it's Feature – create PR with Feature only; if Optimization – with Optimization. I know what sometimes when you modify code, you just modify other and other and other things, because you see something like bug and your hands want to «autofix» it. I reccomended to learn and use Generally, I would be shocked if see auto-downloading function. For example, I set in config |
Superseded by https://github.com/next-theme/plugins
|
I'm not sure if it's because of some historical reasons, but the loading of several third-party libraries is really confusing.
Issue 1: About mermaid and mathjax
Should we create new repo
theme-next-mermaid
ortheme-next-mathjax
? Should we move thecdn
settings of mathjax tovendors
section in_config.yml
? Besides, many third-party libraries haven't been updated for a long time, e.g. the Internal version of jQuery remains 2.1.3Issue 2: About the loading of pdf and mathjax
The
per_page
option is not complete of all possible situations. Is it possible to use a script to detect if there's any math formulae or pdf contens in the page, then loadmathjax.js
orpdfObject.js
with ajax?Besides, I would like to make
pdf
a new tag. The docs of #466 haven't been added yet.Issue 3:
_third_party
?In
layout/_layout.swig
:hexo-theme-next/layout/_layout.swig
Lines 118 to 119 in 1a1bb45
In
layout/_thire-party/scroll-cookie.swig
:hexo-theme-next/layout/_third-party/scroll-cookie.swig
Lines 1 to 4 in 1a1bb45
In
source/js/src/scroll-cookie.js
:hexo-theme-next/source/js/src/scroll-cookie.js
Lines 1 to 25 in 1a1bb45
So, why not just copy
scroll-cookie.js
toscroll-cookie.swig
? This can reduce the times of http requests at the same time.The text was updated successfully, but these errors were encountered: