diff options
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
2 files changed, 19 insertions, 0 deletions
@@ -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 }}"> |