🩹 Ensure `colorScheme` string is lowercase

Fixes #347
pull/352/head
James Panther 2022-11-08 09:08:28 +11:00
parent bc63290f48
commit 5a05141743
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Appearance switcher title doesn't update when switching appearance ([#235](https://github.com/jpanther/congo/issues/235)) - Appearance switcher title doesn't update when switching appearance ([#235](https://github.com/jpanther/congo/issues/235))
- Article updated date logic doesn't consider formatted date values ([#259](https://github.com/jpanther/congo/issues/259)) - Article updated date logic doesn't consider formatted date values ([#259](https://github.com/jpanther/congo/issues/259))
- Order of articles on list pages would not follow Hugo conventions when grouped by year ([#313](https://github.com/jpanther/congo/issues/313)) - Order of articles on list pages would not follow Hugo conventions when grouped by year ([#313](https://github.com/jpanther/congo/issues/313))
- Providing a `colorScheme` value containing uppercase characters would break some deployments ([#347](https://github.com/jpanther/congo/issues/347))
## [2.3.1] - 2022-07-30 ## [2.3.1] - 2022-07-30

View File

@ -32,7 +32,7 @@
{{ end -}} {{ end -}}
{{/* Asset bundles */}} {{/* Asset bundles */}}
{{ $assets := newScratch }} {{ $assets := newScratch }}
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }} {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }}
{{ if not $cssScheme }} {{ if not $cssScheme }}
{{ $cssScheme = resources.Get "css/schemes/congo.css" }} {{ $cssScheme = resources.Get "css/schemes/congo.css" }}
{{ end }} {{ end }}