mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-01 06:50:18 +00:00
variant: fix some resource lookups #1040
This commit is contained in:
parent
521de1e32e
commit
4a4b60ef04
2 changed files with 4 additions and 4 deletions
|
@ -234,7 +234,7 @@ Write yet non-dynamic stuff
|
||||||
{{- $themevariant := .themevariant }}
|
{{- $themevariant := .themevariant }}
|
||||||
{{- $identifier := .identifier }}
|
{{- $identifier := .identifier }}
|
||||||
{{- $themecontent := "" }}
|
{{- $themecontent := "" }}
|
||||||
{{- with resources.Get (printf "css/theme-%s.css" $identifier) }}
|
{{- with resources.Get (printf "/css/theme-%s.css" $identifier) }}
|
||||||
{{- $themecontent = replaceRE `([ \t]*)(:root)` "${1}&${2}" .Content }}
|
{{- $themecontent = replaceRE `([ \t]*)(:root)` "${1}&${2}" .Content }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- errorf "\"theme-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $identifier }}
|
{{- errorf "\"theme-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $identifier }}
|
||||||
|
@ -256,7 +256,7 @@ Write yet non-dynamic stuff
|
||||||
{{- $themecontent = replaceRE `(&\s*)+:root` "&:root" $tempthemecontent }}
|
{{- $themecontent = replaceRE `(&\s*)+:root` "&:root" $tempthemecontent }}
|
||||||
{{- range findRESubmatch `[ \t]*--CODE-theme\s*:\s*([^;]*?)\s*;` $themecontent }}
|
{{- range findRESubmatch `[ \t]*--CODE-theme\s*:\s*([^;]*?)\s*;` $themecontent }}
|
||||||
{{- $chroma = index . 1 }}
|
{{- $chroma = index . 1 }}
|
||||||
{{- $cssres := resources.Get (printf "css/chroma-%s.css" $chroma) }}
|
{{- $cssres := resources.Get (printf "/css/chroma-%s.css" $chroma) }}
|
||||||
{{- if not $cssres }}
|
{{- if not $cssres }}
|
||||||
{{- errorf "\"chroma-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $chroma }}
|
{{- errorf "\"chroma-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $chroma }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -264,7 +264,7 @@ Write yet non-dynamic stuff
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not $chroma }}
|
{{- if not $chroma }}
|
||||||
{{- $chroma = "relearn-light" }}
|
{{- $chroma = "relearn-light" }}
|
||||||
{{- $cssres := resources.Get (printf "css/chroma-%s.css" $chroma) }}
|
{{- $cssres := resources.Get (printf "/css/chroma-%s.css" $chroma) }}
|
||||||
{{- if not $cssres }}
|
{{- if not $cssres }}
|
||||||
{{- errorf "\"chroma-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $chroma }}
|
{{- errorf "\"chroma-%s.css\": file not found in \"assets/css\"; if you are migrating from a theme version older thant 6.0.0, you have to move it over from \"static/css\"" $chroma }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
7.4.1+f3cdaabd291fa40d6b5179a64dd3012975866c74
|
7.4.1+521de1e32e5e1028825729e00e85cc56e078c02a
|
Loading…
Add table
Reference in a new issue