{{ $cdn_url := .Scratch.Get "cdn_url" }}
{{ $postHasImages := .Scratch.Get "postHasImages"}}
{{ $scripts := resources.Get "/js/main.js" | slice }}
{{ $dynamicToTop := resources.Get "/js/dynamicToTop.min.js" }}
{{ $lightGallery_init := resources.Get "/js/lightGallery-init.js" }}
{{ $jquery := `
` }}
{{ $prettify := `
` }}
{{ $lightGallery := `
` }}
{{ $lazysizes := `
` }}
{{ $katex := `
` }}
{{ $typeit := `
` }}
{{ $countdown := `
` }}
{{ $jquery | safeHTML }}
{{ if .IsPage }}
{{ $prettify | safeHTML }}
{{ $typeit | safeHTML }}
{{ $countdown | safeHTML }}
{{ $scripts = $scripts | append $dynamicToTop }}
{{ if $postHasImages }}
{{ $lightGallery | safeHTML }}
{{ $lazysizes | safeHTML }}
{{ $scripts = $scripts | append $lightGallery_init }}
{{ $scripts = $scripts | resources.Concat "/js/vendor_gallery.js" | resources.Minify }}
{{ else }}
{{ $scripts = $scripts | resources.Concat "/js/vendor_no_gallery.js" | resources.Minify }}
{{ end }}
{{ if or .Params.Math .Site.Params.Math }}
{{ $katex | safeHTML }}
{{ end }}
{{ else }}
{{ $scripts = $scripts | resources.Concat "/js/vendor_main.js" | resources.Minify}}
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}