Skip to content

Commit 34868a9

Browse files
committed
Add option to include additional CSS files
Put additional CSS files in the static folder of your site and add the filenames to config.toml in the css parameter. See #13
1 parent 64eaadc commit 34868a9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ The copyright message in the footer uses the name of the author of the site, as
9696
name = "Emiel"
9797
```
9898

99+
### Additional CSS files
100+
101+
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:
102+
103+
```
104+
[Params]
105+
css = ["custom.css"]
106+
```
107+
108+
To load multiple CSS files, use the parameter like this:
109+
110+
```
111+
[Params]
112+
css = ["custom.css", "custom2.css"]
113+
```
114+
99115
## Acknowledgments
100116

101117
Thanks

layouts/partials/head.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
{{- $style := resources.Get "scss/tale.scss" | toCSS $cssOptions }}
2323
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
2424
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">
25+
{{ range .Site.Params.css -}}
26+
<link rel="stylesheet" href="{{ . | relURL }}">
27+
{{ end -}}
2528

2629
<!-- Favicon -->
2730
<link rel="icon" type="image/png" sizes="32x32" href="{{ "images/favicon-32x32.png" | relURL }}">

0 commit comments

Comments
 (0)