From a0d929586b55195934426de258ffd24549a38f5a Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 5 Jan 2025 16:40:30 +0800 Subject: [PATCH] feat: add commitID and channel in footer --- i18n/en.yaml | 7 +++++-- i18n/zh-cn.yaml | 7 +++++-- layouts/partials/footer/footer.html | 16 +++++++++++----- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index fb07328..1e53313 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -66,8 +66,11 @@ search: other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" footer: - builtWith: - other: Built with {{ .Generator }} + poweredBy: + other: Build {{ .Commit }} in {{ .Channel }} channel designedBy: other: Theme {{ .Theme }} designed by {{ .DesignedBy }} + + forkedBy: + other: Forked with 💖 by {{ .ForkedBy }} diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index da39c8f..ac92739 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -60,8 +60,11 @@ search: other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" footer: - builtWith: - other: 使用 {{ .Generator }} 构建 + poweredBy: + other: 构建版本 {{ .Commit }} 于 {{ .Channel }} 频道 designedBy: other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 + + forkedBy: + other: 由 {{ .ForkedBy }} 带着 💖 分叉修改 \ No newline at end of file diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 5026b36..5cb89b0 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -1,5 +1,7 @@ {{- $ThemeVersion := "3.29.0" -}} -{{- $HugoVersion := .Site.Hugo.Version -}} +{{- $BuildID := .Site.Data.Build.ID -}} +{{- $BuildURL := .Site.Data.Build.URL -}} +{{- $BuildChannel := .Site.Data.Build.Channel -}}