♻️ Refactor: deprecate .Sites.First in favor of .Sites.Default

.Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
This commit is contained in:
Cell
2024-07-04 23:37:08 +08:00
parent cf91f230e8
commit 44d0c7611d
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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) | 简体中文说明
+1 -1
View File
@@ -133,7 +133,7 @@ enableEmoji = true
[module]
[module.hugoVersion]
extended = true
min = "0.123.0"
min = "0.127.0"
# -------------------------------------------------------------------------------------
# Markup related configuration in Hugo
+1 -1
View File
@@ -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 -}}
+1 -1
View File
@@ -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) -}}
+1 -1
View File
@@ -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",