Skip to content

Commit

Permalink
Work around jQuery file being included in docs JS
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 8, 2020
1 parent d008dc2 commit b521b11
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions site/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
{{- end }}

{{- $vendor := resources.Match "js/vendor/*.js" -}}
{{- /*
This is a hack; since jquery.min.js is in the vendor folder,
including all of matches breaks JS. As things are now, jquery.min.js
is the last slice element, thus we keep all elements apart from the last one
*/ -}}
{{- $vendor = first (sub (len $vendor) 1) $vendor -}}

{{- $js := resources.Match "js/*.js" -}}
{{- $targetDocsJSPath := printf "/docs/%s/assets/js/docs.js" .Site.Params.docs_version -}}
{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}}
Expand Down

0 comments on commit b521b11

Please sign in to comment.