Load scripts before plugins that might use them.#83
Load scripts before plugins that might use them.#83mtstickney wants to merge 1 commit intoduilio:masterfrom
Conversation
|
shouldn't the plugin just wait the dom to be ready in order to have all deps loaded correctly? |
Body elements are loaded in the order that they are seen; by loading at the end of the body, they are not available for content that needs them, like the github plugin in the sidebar. For the github plugin, this results in a '$ is not defined' error and the repo list is never updated. Moving the scripts to <head> ensures the scripts are loaded before dependent content.
|
Not in this case. The github script is already using At the very least ender.js should be moved into |
|
As far as I can tell the original Octopress theme has these scripts in the section. |
|
I think you're mistaken: _include/head.html has modernizr, octopress.js, and ender.js all loaded in |
|
@mtstickney I meant |
|
I see, apologies for misunderstanding (still probably good to have the reference, though). |
Body elements are loaded in the order that they are seen; by loading
at the end of the body, they are not available for content that needs them,
like the github plugin in the sidebar. For the github plugin, this results
in a '$ is not defined' error and the repo list is never updated. Moving
the scripts to ensures the scripts are loaded before dependent
content.
Update: note that this fixes #79.