-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathfooter-scripts.hbs
36 lines (36 loc) · 1.73 KB
/
footer-scripts.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<script src="{{{uiRootPath}}}/js/site.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/fontawesome-icon-defs.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/fontawesome.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
{{#with (resolvePage page.relativeSrcPath model=false)}}
{{#unless (eq ./asciidoc.attributes.stem undefined)}}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
messageStyle: "none",
tex2jax: { inlineMath: [["\\(", "\\)"]], displayMath: [["\\[", "\\]"]], ignoreClass: "nostem|nolatexmath" },
asciimath2jax: { delimiters: [["\\$", "\\$"]], ignoreClass: "nostem|noasciimath" },
TeX: { equationNumbers: { autoNumber: "none" } }
})
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
data.math.root.display = "block"
}
return data
})
})
</script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
{{/unless}}
{{/with}}
{{#if env.ALGOLIA_API_KEY}}
<script async id="search-script" src="{{{uiRootPath}}}/js/vendor/docsearch.js"{{#if env.ALGOLIA_APP_ID}} data-app-id="{{env.ALGOLIA_APP_ID}}"{{/if}} data-api-key="{{env.ALGOLIA_API_KEY}}" data-index-name="{{env.ALGOLIA_IDX_NAME}}" data-max-results="15" data-stylesheet="{{{uiRootPath}}}/css/vendor/docsearch.css"></script>
{{#if page.home}}
<script>
window.addEventListener('load', function focusSearchInput () {
window.removeEventListener('load', focusSearchInput)
document.querySelector('#search-input').focus()
})
</script>
{{/if}}
{{/if}}