From 4d13248b48329fdd0c6eec99d3b51450455c2285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milutin=20Jovanovic=CC=81?= Date: Fri, 2 Aug 2019 07:42:21 -0400 Subject: [PATCH 1/4] Added ability to override CSS. --- README.md | 2 ++ assets/css/override.css | 6 ++++++ layouts/partials/head.html | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 assets/css/override.css diff --git a/README.md b/README.md index a991476..e412882 100644 --- a/README.md +++ b/README.md @@ -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 }} {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} From 8823b769e09d5a1ad5ce2e9c1174f4f5a10c73f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milutin=20Jovanovic=CC=81?= Date: Fri, 2 Aug 2019 07:42:21 -0400 Subject: [PATCH 2/4] Added ability to override CSS. --- README.md | 2 ++ assets/css/override.css | 6 ++++++ layouts/partials/head.html | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 assets/css/override.css diff --git a/README.md b/README.md index a991476..e412882 100644 --- a/README.md +++ b/README.md @@ -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 }} {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} From 9b3c916750749a522830edbd4227084328e4eceb Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Sat, 28 Sep 2019 14:45:52 -0400 Subject: [PATCH 3/4] Remove assets override css from theme folder --- assets/css/override.css | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 assets/css/override.css diff --git a/assets/css/override.css b/assets/css/override.css deleted file mode 100644 index 233cd21..0000000 --- a/assets/css/override.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - * 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. - */ From b868d4e4cecc781f8abb1d99bb8306aee654d35b Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Sat, 28 Sep 2019 15:07:36 -0400 Subject: [PATCH 4/4] Fix error when no override file present --- assets/css/override.css | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 assets/css/override.css diff --git a/assets/css/override.css b/assets/css/override.css new file mode 100644 index 0000000..78b1517 --- /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. + */ \ No newline at end of file