diff options
author | stefan.strobel <stefanstrobel@gmx.net> | 2016-12-26 13:30:21 +0300 |
---|---|---|
committer | stefan.strobel <stefanstrobel@gmx.net> | 2016-12-26 14:45:40 +0300 |
commit | 486ea53af948ad462f1af026c1927778c3cadd06 (patch) | |
tree | 7b871e3b0e1f4b2efa5989765d2ead3f89991bb9 | |
parent | ec28c414cb2582311afe785d8ae6ec2aa314760a (diff) |
import custom css
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | exampleSite/static/css/custom1.css | 0 | ||||
-rw-r--r-- | exampleSite/static/css/custom2.css | 0 | ||||
-rwxr-xr-x | layouts/partials/head.html | 11 |
4 files changed, 12 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 35071f1..ae10ed8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -6,6 +6,8 @@ theme = "hugo-elate-theme" [params] + custom_css = ["css/custom1.css", "css/custom2.css"] + # Meta author = "" description = "" diff --git a/exampleSite/static/css/custom1.css b/exampleSite/static/css/custom1.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/exampleSite/static/css/custom1.css diff --git a/exampleSite/static/css/custom2.css b/exampleSite/static/css/custom2.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/exampleSite/static/css/custom2.css diff --git a/layouts/partials/head.html b/layouts/partials/head.html index aff3a24..6e6d6c7 100755 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -69,9 +69,18 @@ -->
<link rel="stylesheet" href="css/style.css">
+ <!--
+ custom css files can be configured in config.toml:
+ [params]
+ custom_css = ["css/foo.css", "css/bar.css"]
+ -->
+ {{ range .Site.Params.custom_css }}
+ <link rel="stylesheet" href="{{ . }}">
+ {{ end }}
+
<!-- Modernizr JS -->
<script src="js/modernizr-2.6.2.min.js"></script>
<!-- FOR IE9 below -->
<!--[if lt IE 9]>
<script src="js/respond.min.js"></script>
- <![endif]-->
\ No newline at end of file + <![endif]-->
|