diff options
author | Milutin Jovanović <mjp@voreni.com> | 2019-08-02 14:42:21 +0300 |
---|---|---|
committer | Milutin Jovanović <mjp@voreni.com> | 2019-08-20 13:41:18 +0300 |
commit | 8823b769e09d5a1ad5ce2e9c1174f4f5a10c73f9 (patch) | |
tree | 6de8ef078509f98af985e21cd195c90b7426d36d | |
parent | 0cf324b440f3c6ac96d0b585b7dbe44cbd24b3a5 (diff) |
Added ability to override CSS.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | assets/css/override.css | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
3 files changed, 10 insertions, 1 deletions
@@ -128,6 +128,8 @@ date: the date description: "This is the subtext above the main heading in small letters"
---
```
+#### Overriding CSS
+To override CSS, you should create file `project_root/assets/css/override.css` and place all your CSS inside it. This file will be merged with standard CSS when the site is generated.
## Helpful Links
[Aether Blog Post](https://www.joehutch.com/post/aether-theme/) - See aether in action and learn more about the theme
diff --git a/assets/css/override.css b/assets/css/override.css new file mode 100644 index 0000000..233cd21 --- /dev/null +++ b/assets/css/override.css @@ -0,0 +1,6 @@ +/* + * To override CSS, you should create + * project_root/assets/css/override.css + * and place all your CSS inside it. + * You should not modify this file. + */ diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 222fdc8..79eb808 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -24,7 +24,8 @@ {{ $mainStyle := resources.Get "css/style.css" }} {{ $xcodeStyle := resources.Get "css/xcode.css" }} {{ $fontStyle := resources.Get "css/latolatinfonts.css" }} - {{ $style := slice $xcodeStyle $fontStyle $mainStyle | resources.Concat "css/concated.css" | minify }} + {{ $overrideStyle := resources.Get "css/override.css" }} + {{ $style := slice $xcodeStyle $fontStyle $mainStyle $overrideStyle | resources.Concat "css/concated.css" | minify }} <link href="{{ $style.Permalink }}" rel="stylesheet"> {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} |