From 226dd783ac920752b3ad3cb6e6087219a08ca30a Mon Sep 17 00:00:00 2001
From: zhengyi
Date: Fri, 1 Dec 2023 20:43:34 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E9=80=89=E9=A1=B9=E5=8D=A1=E4=B8=AD?=
=?UTF-8?q?=E6=97=A0=E6=B3=95=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BA=91=E6=9C=8D?=
=?UTF-8?q?=E5=8A=A1=E6=8F=90=E4=BE=9B=E5=95=86=EF=BC=8C=E7=BC=BA=E5=B0=91?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Link #138
---
settings.yaml | 8 ++++++++
templates/modules/common/footer.html | 3 +++
2 files changed, 11 insertions(+)
diff --git a/settings.yaml b/settings.yaml
index c4baea2..1f28cbd 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -2392,6 +2392,7 @@ spec:
label: 否
- $formkit: select
name: driven_by
+ id: driven_by
label: 云服务提供商
value: "none"
help: "配置本站点由xxx云提供云服务"
@@ -2414,6 +2415,13 @@ spec:
label: 金山云
- value: custom
label: 自定义
+ - $formkit: code
+ if: "$get(driven_by).value === 'custom'"
+ name: driven_custom
+ label: 自定义提供商
+ help: "配置自定义服务提供商,此处可填写html代码"
+ value: ""
+ language: html
- $formkit: radio
name: enable_rss
label: 展示 RSS
diff --git a/templates/modules/common/footer.html b/templates/modules/common/footer.html
index d2af735..1351f0e 100644
--- a/templates/modules/common/footer.html
+++ b/templates/modules/common/footer.html
@@ -72,6 +72,9 @@
提供云服务
+
+
+
--
2.40.1
From 7c4393d44a242c4fb186b96839f4097677a5d6e9 Mon Sep 17 00:00:00 2001
From: zhengyi
Date: Wed, 6 Dec 2023 23:02:18 +0800
Subject: [PATCH 2/2] :green_heart: Add gitea ci
---
.gitea/ISSUE_TEMPLATE/bug_report.zh.yml | 50 +++++++++++
.gitea/ISSUE_TEMPLATE/config.yml | 5 ++
.gitea/ISSUE_TEMPLATE/feature_request.zh.yml | 31 +++++++
.gitea/workflows/build.yml | 87 ++++++++++++++++++++
4 files changed, 173 insertions(+)
create mode 100644 .gitea/ISSUE_TEMPLATE/bug_report.zh.yml
create mode 100644 .gitea/ISSUE_TEMPLATE/config.yml
create mode 100644 .gitea/ISSUE_TEMPLATE/feature_request.zh.yml
create mode 100644 .gitea/workflows/build.yml
diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.zh.yml b/.gitea/ISSUE_TEMPLATE/bug_report.zh.yml
new file mode 100644
index 0000000..8bc9737
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/bug_report.zh.yml
@@ -0,0 +1,50 @@
+name: Bug 反馈
+description: 提交 Bug 反馈
+labels: [ bug ]
+body:
+ - type: markdown
+ id: preface
+ attributes:
+ value: |
+ 感谢你花时间填写此错误报告!在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。
+ - type: markdown
+ id: environment
+ attributes:
+ value: "## 环境信息"
+ - type: input
+ id: version
+ validations:
+ required: true
+ attributes:
+ label: "是什么版本出现了此问题?"
+ description: "可以在管理后台的关于页面中找到。"
+ - type: input
+ id: site-url
+ attributes:
+ label: "在线站点地址"
+ description: "如果可以的话,请提供你的站点地址。这可能会帮助我们更好的定位问题。"
+ placeholder: "ex. https://halo.run"
+ validations:
+ required: false
+ - type: markdown
+ id: details
+ attributes:
+ value: "## 详细信息"
+ - type: textarea
+ id: what-happened
+ attributes:
+ label: "发生了什么?"
+ description: "最好还告诉我们,你预计会发生什么。"
+ validations:
+ required: true
+ - type: textarea
+ id: logs
+ attributes:
+ label: "相关日志输出"
+ description: "请复制并粘贴任何相关的日志输出。 这将自动格式化为代码,因此无需反引号。"
+ render: shell
+ - type: textarea
+ id: additional-information
+ attributes:
+ label: "附加信息"
+ description: "如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。"
diff --git a/.gitea/ISSUE_TEMPLATE/config.yml b/.gitea/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..252e839
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+ - name: 对 Joe3 有其他问题
+ url: xxxxxx
+ about: 如果你还有其他疑问,可以加群沟通。
\ No newline at end of file
diff --git a/.gitea/ISSUE_TEMPLATE/feature_request.zh.yml b/.gitea/ISSUE_TEMPLATE/feature_request.zh.yml
new file mode 100644
index 0000000..9b09587
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/feature_request.zh.yml
@@ -0,0 +1,31 @@
+name: 新特性建议
+description: 提交新特性建议
+body:
+ - type: markdown
+ id: preface
+ attributes:
+ value: "你好!在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。"
+ - type: markdown
+ id: environment
+ attributes:
+ value: "## 环境信息"
+ - type: input
+ id: version
+ attributes:
+ label: "你当前使用的版本"
+ description: "可以在管理后台的关于页面中找到。"
+ - type: markdown
+ id: details
+ attributes:
+ value: "## 详细信息"
+ - type: textarea
+ id: description
+ attributes:
+ label: "描述一下此特性"
+ validations:
+ required: true
+ - type: textarea
+ id: additional-information
+ attributes:
+ label: "附加信息"
+ description: "如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。"
\ No newline at end of file
diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml
new file mode 100644
index 0000000..6952c76
--- /dev/null
+++ b/.gitea/workflows/build.yml
@@ -0,0 +1,87 @@
+name: Build distribution theme
+
+on:
+ release:
+ types:
+ - created
+
+jobs:
+ build:
+ runs-on: debian-12
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - name: Compress zip
+ run: |
+ PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
+ PRE_ZIP_FOLDER=halo-theme-Joe3-${PACKAGE_VERSION}
+ ARTIFACT_NAME=${PRE_ZIP_FOLDER}.zip
+ ARTIFACT_PATHNAME=dist/${ARTIFACT_NAME}
+ echo "halo-theme-Joe3 version $PACKAGE_VERSION"
+ echo "Artifact name: ${ARTIFACT_NAME}"
+ echo "Artifact pathname: ${ARTIFACT_PATHNAME}"
+ echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV
+ echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
+ echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
+ echo "RELEASE_ID=${{ github.event.release.id }}" >> $GITHUB_ENV
+ mkdir $PRE_ZIP_FOLDER
+ mkdir dist
+ cp -r theme.yaml settings.yaml annotation-setting.yaml templates $PRE_ZIP_FOLDER/
+ zip -r $ARTIFACT_PATHNAME $PRE_ZIP_FOLDER
+ - name: Upload artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: halo-theme-Joe3
+ path: |
+ dist/*.zip
+ retention-days: 7
+
+ github-release:
+ runs-on: debian-12
+ if: github.event_name == 'release'
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: false
+ - name: Set up Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - name: Compress zip
+ run: |
+ PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
+ PRE_ZIP_FOLDER=halo-theme-Joe3-${PACKAGE_VERSION}
+ ARTIFACT_NAME=${PRE_ZIP_FOLDER}.zip
+ ARTIFACT_PATHNAME=dist/${ARTIFACT_NAME}
+ echo "halo-theme-Joe3 version $PACKAGE_VERSION"
+ echo "Artifact name: ${ARTIFACT_NAME}"
+ echo "Artifact pathname: ${ARTIFACT_PATHNAME}"
+ echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV
+ echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
+ echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
+ echo "RELEASE_ID=${{ github.event.release.id }}" >> $GITHUB_ENV
+ mkdir $PRE_ZIP_FOLDER
+ mkdir dist
+ cp -r theme.yaml settings.yaml annotation-setting.yaml templates $PRE_ZIP_FOLDER/
+ zip -r $ARTIFACT_PATHNAME $PRE_ZIP_FOLDER
+ - name: Upload a release asset
+ uses: actions/github-script@v2
+ with:
+ github-token: ${{secrets.TOKEN}}
+ script: |
+ const fs = require('fs').promises;
+ const { repo: { owner, repo }, sha } = context;
+ console.log({ owner, repo, sha });
+ const releaseId = process.env.RELEASE_ID
+ const artifactPathName = process.env.ARTIFACT_PATHNAME
+ const artifactName = process.env.ARTIFACT_NAME
+ console.log('Releasing', releaseId, artifactPathName, artifactName)
+ await github.repos.uploadReleaseAsset({
+ owner, repo,
+ release_id: releaseId,
+ name: artifactName,
+ data: await fs.readFile(artifactPathName)
+ });
--
2.40.1