-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathBodyEnd.html
More file actions
55 lines (49 loc) · 2.11 KB
/
Copy pathBodyEnd.html
File metadata and controls
55 lines (49 loc) · 2.11 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{{ if .Site.IsServer }}
<script src="https://cdn.jsdelivr.net/npm/shiki@0.10.1/dist/index.jsdelivr.iife.min.js"></script>
{{ $script := resources.Get "_hugo/js/embedHighlight.js" }}
<script src="{{ $script.RelPermalink }}" type="module"></script>
{{ $script := resources.Get "_hugo/js/embedCopyBtn.js" }}
<script src="{{ $script.RelPermalink }}" type="module"></script>
{{ $script := resources.Get "_hugo/js/fixTableOverflow.js" }}
<script src="{{ $script.RelPermalink }}" type="module"></script>
<script type="module">
// We are using ES6 module import feature to make it work
// on both browsers and nodejs.
// https://javascript.info/modules-intro
// Modules are imported from Hugo server relative path.
import { highLightWithShiki } from '/_hugo/js/embedHighlight.js'
import { embedCopyBtn } from '/_hugo/js/embedCopyBtn.js'
import { fixTableOverflow } from '/_hugo/js/fixTableOverflow.js'
highLightWithShiki(shiki)
embedCopyBtn()
fixTableOverflow()
</script>
{{ end }}
{{ $toggleDark := resources.Get "_hugo/js/toggleDark.js" }}
{{ $main := resources.Get "_hugo/js/main.js" }}
{{ $script := slice $main $toggleDark | resources.Concat "_hugo/js/app.js" | fingerprint "md5" | minify }}
<script src="{{ $script.RelPermalink }}" defer></script>
{{ if .IsHome }}
<script defer src="https://platform.x.com/widgets.js" charset="utf-8"></script>
{{ $script := resources.Get "_hugo/js/embedTweets.js" | fingerprint "md5" | minify }}
<script defer src="{{ $script.RelPermalink }}"></script>
{{ end }}
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script>
fetch('https://api.github.com/repos/pytorch/ignite/releases/latest')
.then((val) => val.json())
.then((val) => {
docsearch({
container: '#docsearch',
appId: '7EWYE1JCT3',
apiKey: '841e93e60c16975ba1bd8c7c716eed82',
indexName: 'pytorch-ignite',
searchParameters: {
facetFilters: [[`version:${val.tag_name}`, 'tags:Website']],
}
})
})
</script>
{{ if not .Site.IsServer }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}