Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Photoswipe was not loaded when not using CDN #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,13 @@

<!-- Load PhotoSwipe js if the load-photoswipe shortcode has been used -->
{{ if or .Site.Params.photoswipe .Site.Params.fancybox }}
<script type="text/javascript" src="{{ "js/load-photoswipe.js" | relURL }}"></script>
{{ if .Site.Params.bootcdn }}
<script src="{{ "js/load-photoswipe.js" | relURL }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk="
crossorigin="anonymous"></script>
{{ else if .Site.Params.publicCDN.enable }}
<script type="text/javascript" src="{{ "js/load-photoswipe.js" | relURL }}"></script>
{{ .Site.Params.publicCDN.photoswipe | safeHTML }}
{{ .Site.Params.publicCDN.photoswipeUI | safeHTML }}
{{ else }}
Expand Down