From e51e0f7b8954c61f312fbf2e3b0694d412c6f9bb Mon Sep 17 00:00:00 2001
From: amzrk2
Date: Thu, 16 Apr 2020 15:45:21 +0800
Subject: Optional intersection observer js
---
exampleSite/config.toml | 1 +
layouts/partials/head.html | 2 ++
2 files changed, 3 insertions(+)
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 0f43f56..6b7e189 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -56,6 +56,7 @@ paginate = 10
# Custom lazyload thumbnail
cdnLazyloadSRC = "https://cdn.jsdelivr.net/gh/amzrk2/poal-jsdelivr/lazyload/dsr_loading.svg"
# Custom css & js CDN
+ # cdnIntersectionObserverJS = "https://cdn.jsdelivr.net/npm/intersection-observer@0.7.0/intersection-observer.min.js" # Optional
cdnVanillaLazyloadJS = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.min.js"
cdnJQueryJS = "https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"
cdnProgessJS = "https://cdn.jsdelivr.net/npm/progressbar.js@1.1.0/dist/progressbar.min.js"
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index df0f46a..c5331cc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -27,6 +27,8 @@
{{ $options := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
+{{ with .Site.Params.cdnIntersectionObserverJS }}
+{{ end }}
--
cgit v1.2.3