{{/* jQuery */}}
{{ $jqueryLib := resources.Get "lib/jquery/jquery.slim.min.js" }}
{{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }}
{{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }}
{{ end }}
{{/* Chart */}}
{{ if .Page.HasShortcode "chart" }}
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
{{ end }}
{{/* Katex */}}
{{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
{{ end }}
{{ end }}
{{/* TypeIt */}}
{{ if .Page.HasShortcode "typeit" }}
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" }}
{{ end }}
{{/* Packery */}}
{{ if .Page.HasShortcode "gallery" }}
{{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }}
{{ $jsShortcodeGallery := resources.Get "js/shortcodes/gallery.js" }}
{{ $jsShortcodeGallery = $jsShortcodeGallery | resources.Minify | resources.Fingerprint "sha512" }}
{{ end }}
{{/* tw-elements */}}
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline")}}
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
{{ end }}
{{/* youtubeLite */}}
{{ if .Page.HasShortcode "youtubeLite" }}
{{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" }}
{{ $youtubeLiteCSS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.css" }}
{{ end }}