Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/budparr/gohugo-theme-ananke.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis Philibert <login@regisphilibert.com>2022-04-21 18:48:54 +0300
committerGitHub <noreply@github.com>2022-04-21 18:48:54 +0300
commit751ac93c1bcfcbe04f82a148382f2dbea255acb6 (patch)
treea47591b97be4cf04ca0b5cc1ee15f1fa7e9ec746
parente91f77c5be8c196634cd1808336bdc6f72235e16 (diff)
Upgrade "minVersion" of theme to 84 (#543)
* Upgrade "minVersion" of theme to 84 Check hugo.IsExtended before trying to process scss files Fixes #541
-rw-r--r--README.md1
-rw-r--r--config.yaml2
-rw-r--r--exampleSite/content/en/_index.md2
-rw-r--r--layouts/partials/func/style/GetMainCSS.html13
-rwxr-xr-xtheme.toml2
5 files changed, 16 insertions, 4 deletions
diff --git a/README.md b/README.md
index 33b1f6e..9c087e1 100644
--- a/README.md
+++ b/README.md
@@ -239,6 +239,7 @@ For example, if your css files are `assets/ananke/css/custom.css` and `assets/an
[params]
custom_css = ["custom.css","special.css"]
```
+__IMPORTANT__: Files registered through the `custom_css` array, while unlimited in number, must be of the same type (Ex: all `scss` or all `css`)
__Note on retrocompatibiliy for custom css__: If the files registered through the `custom_css` setting are not found in `assets/ananke/css` the theme will expect them to live at the given path relative to the static directory and load them as <link> requests.
diff --git a/config.yaml b/config.yaml
index 2670a38..3caba77 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,3 +1,3 @@
module:
hugoVersion:
- min: "0.64.0" \ No newline at end of file
+ min: "0.84.0" \ No newline at end of file
diff --git a/exampleSite/content/en/_index.md b/exampleSite/content/en/_index.md
index 896258b..aaee3a8 100644
--- a/exampleSite/content/en/_index.md
+++ b/exampleSite/content/en/_index.md
@@ -2,6 +2,8 @@
title: "Ananke: a Hugo Theme"
description: "The last theme you'll ever need. Maybe."
+# 1. To ensure Netlify triggers a build on our exampleSite instrance, we need to change a file in the exampleSite directory.
+theme_version: '2.8.2'
cascade:
featured_image: '/images/gohugo-default-sample-hero-image.jpg'
---
diff --git a/layouts/partials/func/style/GetMainCSS.html b/layouts/partials/func/style/GetMainCSS.html
index c4daa88..16ecd29 100644
--- a/layouts/partials/func/style/GetMainCSS.html
+++ b/layouts/partials/func/style/GetMainCSS.html
@@ -42,11 +42,20 @@
{{ end }}
{{/* We look for any custom css files registered by the user under `site.params.custom_css and if found in the theme's
-css asset directory we add to aforementioned slice */}}
+css asset directory we (unless condition below) add to aforementioned slice */}}
{{ with site.Params.custom_css }}
{{ range . }}
{{ with partialCached "func/style/GetResource" . . }}
- {{ $assets_to_concat = $assets_to_concat | append . }}
+ {{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }}
+ {{ if hugo.IsExtended }}
+ {{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}}
+ {{ $assets_to_concat = $assets_to_concat | append (. | resources.ToCSS) }}
+ {{ else }}
+ {{ partial "func/warn" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }}
+ {{ end }}
+ {{ else }}
+ {{ $assets_to_concat = $assets_to_concat | append . }}
+ {{ end }}
{{ end }}
{{ end }}
{{ end }}
diff --git a/theme.toml b/theme.toml
index e842195..2add648 100755
--- a/theme.toml
+++ b/theme.toml
@@ -8,7 +8,7 @@ description = "A Base theme for building full featured Hugo sites"
homepage = "https://github.com/theNewDynamic/gohugo-theme-ananke"
tags = ["website", "starter", "responsive", "Disqus", "blog", "Tachyons", "Multilingual", "Stackbit"]
features = ["posts", "shortcodes", "related content", "comments"]
-min_version = "0.64.0"
+min_version = "0.84.0"
[author]
name = "theNewDynamic"