When I set up Blog 1 for MathJax and fancybox, I included some
custom code in source/_includes/custom/head.html
. I moved them to
source/javascripts/MathJaxLocal.js
and
source/javascripts/FancyBoxLocal.js
because I don’t like
JavaScript code inside HTML files.1
In the past, I put those code in source/_includes/custom/head.html
because of Felix Chern’s post.2 However, there’s another better
way.3 Why is it better? It saves thousands of lines of code.
Apart from that, it’s a way to separate the behaviour of a document
from the contents.4
-
See Writing Math Equations on Octopress in Carpe Diem. ↩
-
See Blogging With Math: Octopress, MathJax, and Pandoc in DrZ.ac. ↩
-
See Separation of semantic and presentational markup, to the extent possible, is architecturally sound in W3C. ↩