Skip to content

Commit

Permalink
♻️ Refactor: deprecate .Sites.First in favor of .Sites.Default
Browse files Browse the repository at this point in the history
.Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
  • Loading branch information
Lruihao committed Jul 4, 2024
1 parent cf91f23 commit 44d0c76
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FixIt Theme | Hugo

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)

👉 English README | [简体中文说明](README.zh-cn.md)
Expand Down
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FixIt 主题 | Hugo

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)

👉 [English README](README.md) | 简体中文说明
Expand Down
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enableEmoji = true
[module]
[module.hugoVersion]
extended = true
min = "0.123.0"
min = "0.127.0"

# -------------------------------------------------------------------------------------
# Markup related configuration in Hugo
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init/detection-env.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{- if ne .Site.Params.dev.enable true -}}
{{- .Scratch.Set "devOpts" dict -}}
{{- end -}}
{{- if eq .Site .Sites.First -}}
{{- if eq .Site .Sites.Default -}}
{{- warnf "FixIt %v\n%v\n\n" (.Scratch.Get "version") (T "init.devEnvWarn") -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/init/detection-version.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{- end -}}

{{- /* FixIt theme version detection */ -}}
{{- if eq .Site .Sites.First -}}
{{- if eq .Site .Sites.Default -}}
{{- if not .Site.Params.version -}}
{{- errorf "FixIt %v\n%v\n\n" $version (T "init.configurationError") -}}
{{- else if gt "0.2.0" (strings.TrimPrefix "v" .Site.Params.version) -}}
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ licenselink = "https://github.com/hugo-fixit/FixIt/blob/master/LICENSE"
description = "A Clean, Elegant but Advanced Hugo Theme for Hugo."
homepage = "https://github.com/hugo-fixit/FixIt"
demosite = "https://fixit.lruihao.cn"
min_version = "0.123.0"
min_version = "0.127.0"

tags = [
"blog",
Expand Down

0 comments on commit 44d0c76

Please sign in to comment.