From 41727a62e2afa9cdb1c828ddeafc2928d5566c3b Mon Sep 17 00:00:00 2001
From: shawn <ag4ve.us@gmail.com>
Date: Tue, 24 Apr 2018 12:48:53 +0000
Subject: [PATCH] Issue 98 (#101)
---
layouts/_default/baseof.html | 3 +++
README.md | 11 +++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
index 025df39..fe0e395 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,17 @@
_n.b. in future versions we will likely separate the typeface and other body classes._
+### Custom CSS
+
+You can override the built-in css by using your own. Just put your own css files in the `static` directory of your website (the one in the theme directory also works but is not recommended) and modify the `custom_css` parameter in your config file. The path referenced in the parameter should be relative to the `static` folder. These css files will be added through the `header` partial after the built-in css file.
+
+For example, if your css files are `static/css/custom.css` and `static/css/custom2.css` then add the following to the config file:
+
+```
+ [params]
+ custom_css = ["css/custom.css","css/custom2.css"]
+```
+
### Nearly finished
In order to see your site in action, run Hugo's built-in local server.
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4b47c78..fa70360 100755
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -22,6 +22,9 @@
<link href="{{ absURL (printf "%s%s" "/dist/" .) }}" rel="stylesheet">
{{ end }}
+ {{ range .Site.Params.custom_css }}
+ <link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
+ {{ end }}
{{ block "favicon" . }}
{{ partial "site-favicon.html" . }}
--
Gitblit v1.10.0