From f70433763cb4448147742831d38b434f30241435 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 7 Aug 2018 13:18:19 +0000 Subject: [PATCH] make cdn urls customizable --- data/reveal_hugo.toml | 3 +++ layouts/_default/baseof.reveal.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/reveal_hugo.toml b/data/reveal_hugo.toml index 973cc27..1b3f1fb 100644 --- a/data/reveal_hugo.toml +++ b/data/reveal_hugo.toml @@ -6,3 +6,6 @@ progress = true history = true center = true transition = 'slide' # none/fade/slide/convex/concave/zoom + +reveal_cdn = "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" +highlight_cdn = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" diff --git a/layouts/_default/baseof.reveal.html b/layouts/_default/baseof.reveal.html index de3ec3d..cfd9f20 100644 --- a/layouts/_default/baseof.reveal.html +++ b/layouts/_default/baseof.reveal.html @@ -1,6 +1,6 @@ -{{- $reveal_cdn := "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" -}} -{{- $highlight_cdn := "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" -}} +{{- $reveal_cdn := or .Page.Params.reveal_hugo.reveal_cdn .Site.Params.reveal_hugo.reveal_cdn .Site.Data.reveal_hugo.defaults.reveal_cdn "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" -}} +{{- $highlight_cdn := or .Page.Params.reveal_hugo.highlight_cdn .Site.Params.reveal_hugo.highlight_cdn .Site.Data.reveal_hugo.defaults.highlight_cdn "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" -}}