Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2019-03-03 17:09:57 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2019-03-03 17:09:57 +0300
commit34868a963c7f62a95f3126a3b9ff4ed6208051eb (patch)
treee7953044314c8646f3583ee66330447eaf8f04a9
parent64eaadc5a0be9e727950bc3879eeb7ab55eba9db (diff)
Add option to include additional CSS filesv1.1.0
Put additional CSS files in the static folder of your site and add the filenames to config.toml in the css parameter. See #13
-rw-r--r--README.md16
-rw-r--r--layouts/partials/head.html3
2 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8db653c..50b8129 100644
--- a/README.md
+++ b/README.md
@@ -96,6 +96,22 @@ The copyright message in the footer uses the name of the author of the site, as
name = "Emiel"
```
+### Additional CSS files
+
+The theme can load additional CSS files for you, e.g. to override some of the styles, or the CSS that goes with a component that you're using. To add additional CSS files, put these files in the `static` folder of your site and add the `css` parameter to `config.toml`, like so:
+
+```
+[Params]
+css = ["custom.css"]
+```
+
+To load multiple CSS files, use the parameter like this:
+
+```
+[Params]
+css = ["custom.css", "custom2.css"]
+```
+
## Acknowledgments
Thanks
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 8df82f2..4b2d79b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -22,6 +22,9 @@
{{- $style := resources.Get "scss/tale.scss" | toCSS $cssOptions }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">
+ {{ range .Site.Params.css -}}
+ <link rel="stylesheet" href="{{ . | relURL }}">
+ {{ end -}}
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="{{ "images/favicon-32x32.png" | relURL }}">