Skip to content

Commit

Permalink
fix: remove usage of deprecated functions and variables of upstream
Browse files Browse the repository at this point in the history
Replace Sites.First with Sites.Default

Replcae resources.PostCSS with css.PostCSS

Require Hugo version not lower than 0.128.0
  • Loading branch information
razonyang committed Aug 20, 2024
1 parent f8b09f2 commit 9f029f1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[module]
[module.hugoVersion]
extended = true
min = "0.97.0"
min = "0.128.0"

[params]
breadcrumb = true
Expand Down
2 changes: 1 addition & 1 deletion layouts/alias.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
{{- partial "assets/init/js" .Page -}}
{{- partialCached "assets/main/css" .Page }}
{{- $isHome := eq .Permalink (site.Sites.First.Home.Permalink) }}
{{- $isHome := eq .Permalink (site.Sites.Default.Home.Permalink) }}
{{- if $isHome }}
{{- $homes := newScratch }}
{{- range site.Sites }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/assets/main/css-rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- $options := dict "targetPath" "assets/main/bundle.rtl.min.css" "outputStyle" $outputStyle "includePaths" (slice "node_modules") }}
{{- $config := resources.Get "main/scss/_config.scss" | resources.ExecuteAsTemplate "main/scss/_config.rtl.scss" . }}
{{- $main := resources.Get "main/scss/index.scss" }}
{{- $style := slice $config $main | resources.Concat "main/scss/main.rtl.css" | toCSS $options | resources.PostCSS $postCSSOptions | fingerprint }}
{{- $style := slice $config $main | resources.Concat "main/scss/main.rtl.css" | toCSS $options | css.PostCSS $postCSSOptions | fingerprint }}
{{- if hugo.IsProduction }}{{ $style = $style | resources.PostProcess }}{{ end }}
<link data-precache rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous">
{{- partial "assets/main/custom" . }}
2 changes: 1 addition & 1 deletion layouts/partials/assets/main/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{- $config := resources.Get "main/scss/_config.scss" | resources.ExecuteAsTemplate "main/scss/_config.scss" . }}
{{- $main := resources.Get "main/scss/index.scss" }}
{{- $styles := slice $config $main }}
{{- $styles := $styles | resources.Concat "main/scss/main.css" | toCSS $options | resources.PostCSS $postCSSOptions | fingerprint }}
{{- $styles := $styles | resources.Concat "main/scss/main.css" | toCSS $options | css.PostCSS $postCSSOptions | fingerprint }}
{{- if hugo.IsProduction }}{{ $styles = $styles | resources.PostProcess }}{{ end }}
<link data-precache rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous">
{{- partial "assets/main/custom" . }}

0 comments on commit 9f029f1

Please sign in to comment.