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

github.com/humrochagf/colordrop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHumberto Rocha <humrochagf@gmail.com>2020-10-30 16:25:16 +0300
committerGitHub <noreply@github.com>2020-10-30 16:25:16 +0300
commit16f9e3600849923ef3e0c15ba78a0a128ca7a2b9 (patch)
treee2c391aee1b80f770bbc6b37b5d8103574112549
parenta57ff5613785e13ee8a76933d2987529c8d5dd0e (diff)
parentfa78a0060b2e4fe9b4d3046410e7f3551890362a (diff)
Merge pull request #2 from chris-asl/allow-custom-css
support custom CSS files
-rw-r--r--README.md9
-rw-r--r--layouts/_default/baseof.html3
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9c0a52a..cdc91a4 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,15 @@ params:
siteLogo: "logo-photo.png"
```
+## Custom CSS
+
+You can load your custom CSS files by adding them under the `static` folder, e.g. `static/css/custom.css` and then defining the parameters:
+
+```yaml
+params:
+ custom_css: "css/custom.css"
+```
+
## Website Example
You check [my blog](https://humberto.io) to see the theme fully running.
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8fffebc..a465426 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,6 +12,9 @@
<!-- styles -->
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
+ {{ range .Site.Params.custom_css -}}
+ <link rel="stylesheet" href="{{ . | absURL }}">
+ {{- end }}
{{ block "headAdditional" . }}
{{ end }}