From 6f75916cf8829fde0153822a35f2a36aaea49942 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Fri, 1 Apr 2016 19:04:12 +0200 Subject: [PATCH] Add option for custom assets --- exampleSite/config.toml | 4 ++++ layouts/partials/head.html | 4 ++++ layouts/partials/js.html | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ab5855c..3b11167 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,6 +16,10 @@ disqusShortname = "spf13" twitter = "Your Twitter account" enableRSS = true + # Add custom assets with their paths relative to the static folder + customCSS = [] + customJS = [] + # The variables below are optionally too and can be used to # translate or customize each string of the theme. diff --git a/layouts/partials/head.html b/layouts/partials/head.html index cbb251e..59fa716 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,6 +11,10 @@ + {{ range .Site.Params.customCSS }} + + {{ end }} + {{ if eq .Site.Params.iconFont "font-awesome" }} {{ else }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 2cff071..028d84b 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -2,4 +2,9 @@ + +{{ range .Site.Params.customJS }} + +{{ end }} + {{ template "_internal/google_analytics.html" . }}