From b54ec3d45b077919ec00d61b8ee922d20d0b6e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mr=C3=B3z?= Date: Thu, 23 May 2019 18:59:30 +0200 Subject: [PATCH] Add custom_js site param for enabling custom js (#182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add custom_js site param for enabling custom js I've hit that when adding Cookie Consent on my web page. https://github.com/insites/cookieconsent * PR Remarks - added Custom JS into exampleSite * Update layouts/_default/baseof.html Co-Authored-By: Luiz F. A. de Prá * Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index a6f2591..8c4041f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -37,3 +37,4 @@ - [D_DAndrew](https://d-dandrew.github.io) - [Wataru Mizukami](https://github.com/tarumzu) - [Yudi Widiyanto](https://github.com/yudiwdynto) +- [Łukasz Mróz](https://github.com/mrozlukasz) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2a3a1bf..d4e086b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -41,6 +41,9 @@ disqusShortname = "yourdiscussshortname" # Custom CSS custom_css = [] + + # Custom JS + custom_js = [] [taxonomies] category = "categories" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a5f8b12..416d077 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -60,9 +60,13 @@ {{ end }} {{ range .Site.Params.custom_css }} - + {{ end }} + {{ range .Site.Params.custom_js }} + + {{ end }} +