Browse Source

Issue 98 (#101)

* Add custom_css parameter.

* Copy documentation from hugo-octopress.
tags/2.3
shawn 6 years ago
parent
commit
41727a62e2
2 changed files with 14 additions and 0 deletions
  1. 11
    0
      README.md
  2. 3
    0
      layouts/_default/baseof.html

+ 11
- 0
README.md View File

@@ -115,6 +115,17 @@ And a list of background colors [here](https://github.com/tachyons-css/tachyons/
_n.b. in future versions we will likely separate the typeface and other body classes._


### Custom CSS

You can override the built-in css by using your own. Just put your own css files in the `static` directory of your website (the one in the theme directory also works but is not recommended) and modify the `custom_css` parameter in your config file. The path referenced in the parameter should be relative to the `static` folder. These css files will be added through the `header` partial after the built-in css file.

For example, if your css files are `static/css/custom.css` and `static/css/custom2.css` then add the following to the config file:

```
[params]
custom_css = ["css/custom.css","css/custom2.css"]
```

### Nearly finished

In order to see your site in action, run Hugo's built-in local server.

+ 3
- 0
layouts/_default/baseof.html View File

@@ -22,6 +22,9 @@
<link href="{{ absURL (printf "%s%s" "/dist/" .) }}" rel="stylesheet">
{{ end }}

{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}

{{ block "favicon" . }}
{{ partial "site-favicon.html" . }}

Loading…
Cancel
Save