Update readme

Add instructions about modifying theme color or fonts, see #66
This commit is contained in:
Track3 2019-05-11 22:09:00 +08:00
parent 281dd59105
commit 0101f8b8d9

View file

@ -95,14 +95,16 @@ We only have built-in support for Disqus at the moment, if that doesn't fit your
##### Add custom analytics
If you prefer to use different analytics system other than google analytics, then add them inside `layouts/partials/analytics.html`.
#### Add custom css
#### Customize CSS
For adding custom css to the theme, you need to assign an array of references in `config.toml` like following:
If you'd like to customize theme color or fonts, you can simply override `assets/scss/_predefined.scss`, by simply copy it to site's root (keep the same relative path) then edit those variables. But keep in mind, you'll need **Hugo extended version** which has the ability to rebuild SCSS. You don't have to use extended version in production but in this case it's necessary to make sure the `resources` folder is committed and "up to date" (by running `hugo` or `hugo server` locally using the extended version). But anyway, always use the extended version if you can.
For adding other custom CSS to the theme, you can assign an array of references in `config.toml` like following:
```
[params]
customCSS = ["css/foo.css", "css/bar.css"]
```
You can reference as many stylesheets as you want. Their paths need to be relative to the `static` folder or they can be network resources.
You may reference as many stylesheets as you want. Their paths need to be relative to the `static` folder or it can be a full URL for external resources.
#### Code injection