Skip to content

Commit

Permalink
Add option to include additional CSS files
Browse files Browse the repository at this point in the history
Put additional CSS files in the static folder of your site and add the
filenames to config.toml in the css parameter.

See #13
  • Loading branch information
EmielH committed Mar 3, 2019
1 parent 64eaadc commit 34868a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}">
Expand Down

0 comments on commit 34868a9

Please sign in to comment.