Compare commits
No commits in common. "gh-pages" and "main" have entirely different histories.
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Hugo
|
||||||
|
public/*
|
||||||
|
resources
|
||||||
|
assets/jsconfig.json
|
||||||
|
.hugo_build.lock
|
||||||
|
|
||||||
|
# Headers
|
||||||
|
!public
|
||||||
|
!public/_headers
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
.history/
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
# Fucking macOS
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "themes/hugo-theme-stack"]
|
||||||
|
path = themes/hugo-theme-stack
|
||||||
|
url = https://git.sunyz.net/realSunyz/hugo-theme-stack
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Yanzheng SUN
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## Seven's Blog
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE](https://github.com/realSunyz/pub.seven.blog/blob/main/LICENSE) file for details.
|
5
archetypes/default.md
Normal file
5
archetypes/default.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
+++
|
||||||
|
date = '{{ .Date }}'
|
||||||
|
draft = true
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
+++
|
18
config/_default/config.yaml
Normal file
18
config/_default/config.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
baseURL: https://blog.sunyz.dev/
|
||||||
|
languageCode: en-us
|
||||||
|
title: Seven\'s Blog
|
||||||
|
theme: hugo-theme-stack
|
||||||
|
|
||||||
|
defaultContentLanguage: en
|
||||||
|
defaultContentLanguageInSubdir: true
|
||||||
|
|
||||||
|
rssFullContent: true
|
||||||
|
|
||||||
|
enableRobotsTXT: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
disqus:
|
||||||
|
shortname: realsunyz
|
||||||
|
|
||||||
|
pagination:
|
||||||
|
pagerSize: 5
|
14
config/_default/languages.en.yaml
Normal file
14
config/_default/languages.en.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
languageCode: en
|
||||||
|
languageDirection: ltr
|
||||||
|
languageName: English
|
||||||
|
contentDir: content/en
|
||||||
|
hasCJKLanguage: false
|
||||||
|
|
||||||
|
title: Seven's Blog
|
||||||
|
|
||||||
|
params:
|
||||||
|
sidebar:
|
||||||
|
subtitle: The next time we may meet anywhere, but we are always as brilliant as a sea of stars.
|
||||||
|
article:
|
||||||
|
license:
|
||||||
|
default: Licensed under CC BY-NC-SA 4.0
|
14
config/_default/languages.zh-cn.yaml
Normal file
14
config/_default/languages.zh-cn.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
languageCode: zh-cn
|
||||||
|
languageDirection: ltr
|
||||||
|
languageName: Chinese (Simplified)
|
||||||
|
contentDir: content/zh-cn
|
||||||
|
hasCJKLanguage: true
|
||||||
|
|
||||||
|
title: Seven 的日记本
|
||||||
|
|
||||||
|
params:
|
||||||
|
sidebar:
|
||||||
|
subtitle: 下一次相遇可能在任何地方,但我们始终灿烂如星海。
|
||||||
|
article:
|
||||||
|
license:
|
||||||
|
default: 使用 CC BY-NC-SA 4.0 协议授权
|
17
config/_default/markup.yaml
Normal file
17
config/_default/markup.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
goldmark:
|
||||||
|
renderer:
|
||||||
|
unsafe: true
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
endLevel: 4
|
||||||
|
ordered: true
|
||||||
|
startLevel: 2
|
||||||
|
|
||||||
|
highlight:
|
||||||
|
noClasses: false
|
||||||
|
codeFences: true
|
||||||
|
guessSyntax: true
|
||||||
|
lineNoStart: 1
|
||||||
|
lineNos: true
|
||||||
|
lineNumbersInTable: true
|
||||||
|
tabWidth: 4
|
6
config/_default/menu.yaml
Normal file
6
config/_default/menu.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
social:
|
||||||
|
- identifier: github
|
||||||
|
name: GitHub
|
||||||
|
url: https://github.com/realSunyz
|
||||||
|
params:
|
||||||
|
icon: brand-github
|
47
config/_default/params.yaml
Normal file
47
config/_default/params.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
mainSections: post
|
||||||
|
rssFullContent: true
|
||||||
|
favicon: https://cdn.sunyz.net/favicons/favicon.ico
|
||||||
|
|
||||||
|
footer:
|
||||||
|
since: 2023
|
||||||
|
customText:
|
||||||
|
|
||||||
|
dateFormat:
|
||||||
|
published: Jan 02, 2006
|
||||||
|
lastUpdated: Jan 02, 2006 15:04 MST
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
emoji: 🐶
|
||||||
|
avatar:
|
||||||
|
enabled: true
|
||||||
|
local: false
|
||||||
|
src: https://cdn.sunyz.net/avatar@512x512.png
|
||||||
|
|
||||||
|
article:
|
||||||
|
math: false
|
||||||
|
readingTime: true
|
||||||
|
license:
|
||||||
|
enabled: true
|
||||||
|
default: Licensed under CC BY-NC-SA 4.0
|
||||||
|
|
||||||
|
widgets:
|
||||||
|
homepage:
|
||||||
|
- type: search
|
||||||
|
- type: archives
|
||||||
|
- type: categories
|
||||||
|
page:
|
||||||
|
- type: toc
|
||||||
|
|
||||||
|
colorScheme:
|
||||||
|
toggle: true
|
||||||
|
default: auto
|
||||||
|
|
||||||
|
comments:
|
||||||
|
enabled: true
|
||||||
|
provider: disqus
|
||||||
|
|
||||||
|
imageProcessing:
|
||||||
|
cover:
|
||||||
|
enabled: true
|
||||||
|
content:
|
||||||
|
enabled: true
|
2
config/_default/permalinks.yaml
Normal file
2
config/_default/permalinks.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
post: /p/:filename/
|
||||||
|
page: /:filename
|
8
content/en/_index.md
Normal file
8
content/en/_index.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
name: Home
|
||||||
|
weight: 1
|
||||||
|
params:
|
||||||
|
icon: home
|
||||||
|
---
|
13
content/en/about.md
Normal file
13
content/en/about.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: About
|
||||||
|
slug: about
|
||||||
|
date: 2024-01-28
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 5
|
||||||
|
params:
|
||||||
|
icon: user
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🏗️ Just a minute
|
11
content/en/archives.md
Normal file
11
content/en/archives.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: Archives
|
||||||
|
layout: archives
|
||||||
|
slug: archives
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 2
|
||||||
|
params:
|
||||||
|
icon: archives
|
||||||
|
---
|
129
content/en/post/deploy-gitea-using-podman-on-linux.md
Normal file
129
content/en/post/deploy-gitea-using-podman-on-linux.md
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
---
|
||||||
|
title: Deploy Gitea using Podman on Linux
|
||||||
|
date: 2025-01-03
|
||||||
|
categories: [Tech, Self-Hosted]
|
||||||
|
image: https://cdn.sunyz.net/assets/blog/banners/deploy-gitea-using-podman-on-linux.en.webp
|
||||||
|
---
|
||||||
|
|
||||||
|
Gitea is a lightweight, self-hosted DevOps platform with features such as Git hosting, code review, team collaboration, package registry, and CI/CD.
|
||||||
|
To ensure that Gitea meets your needs, it is recommended to read the [comparison table](https://docs.gitea.com/installation/comparison) for Gitea and other competing products (e.g. GitLab CE) before installing it.
|
||||||
|
|
||||||
|
## Install Podman [^1]
|
||||||
|
|
||||||
|
Podman can be installed using package managers (recommended) or manually build from source.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Debian & Ubuntu
|
||||||
|
sudo apt-get install podman
|
||||||
|
# Arch & Manjaro
|
||||||
|
sudo pacman -S podman
|
||||||
|
# Alpine
|
||||||
|
sudo apk add podman
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using RHEL, please read the appropriate [docs](https://access.redhat.com/solutions/3650231) in the Red Hat Knowledgebase.
|
||||||
|
|
||||||
|
## Install Podman Compose [^2]
|
||||||
|
|
||||||
|
Podman itself does NOT support the [compose specification](https://compose-spec.io). To use features like Docker Compose with Podman, we need to install a community-maintained utility named Podman Compose.
|
||||||
|
|
||||||
|
Alternatively, since Podman has native support for Kubernetes, you can use Kubernetes configurations to run Gitea instead.
|
||||||
|
|
||||||
|
It is suggested to install Podman Compose using pip, a package manager for Python packages.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo apt-get install python3-pip -y
|
||||||
|
pip3 install podman-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
If you get errors saying *externally-managed-environment*, here are two ways to resolve this issue.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Use pipx
|
||||||
|
sudo apt-get install pipx -y
|
||||||
|
sudo pipx ensurepath --global
|
||||||
|
pipx install podman-compose
|
||||||
|
|
||||||
|
# Create a virtual environment
|
||||||
|
# You can ONLY use podman-compose in the current folder with this method.
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install podman-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
## Write Compose File [^3]
|
||||||
|
|
||||||
|
Podman Compose uses the same syntax as Docker Compose. So you can even just copy the docker-compose.yml from the official Gitea docs.
|
||||||
|
|
||||||
|
Below is my compose file for reference.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: docker.io/gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
volumes:
|
||||||
|
- /usr/local/gitea/data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
```
|
||||||
|
|
||||||
|
To use my configuration, you will need to enter the following commands.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create directories for Gitea
|
||||||
|
mkdir /usr/local/gitea /usr/local/gitea/data
|
||||||
|
# Allow the container to read and write data to the data folder
|
||||||
|
chown 1000:1000 /usr/local/gitea/data
|
||||||
|
# Run podman compose
|
||||||
|
podman-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: Gitea uses SQLite as the default database. If you want to use an external database (MySQL or PostgreSQL), please add the corresponding part after Gitea's compose configuration.
|
||||||
|
|
||||||
|
## Configure Gitea
|
||||||
|
|
||||||
|
After starting the container, you should visit `http://SERVER_IP:3000` and follow the installation wizard. The first user registered will become the admin.
|
||||||
|
|
||||||
|
Then, you can find the configuration file for Gitea at `CUSTOM_FOLDER/gitea/conf/app.ini`, which includes the settings you entered in the installation wizard.
|
||||||
|
|
||||||
|
### Email Notification [^4]
|
||||||
|
|
||||||
|
Gitea supports the following protocols: smtp, smtps, smtp+starttls, smtp+unix, sendmail, dummy. The most common protocol is smtps, so if you are not sure which one to use, use that one.
|
||||||
|
|
||||||
|
The value of FROM attribute should be something like `Sender Name <Email Address>`, e.g. `Gitea <git@example.com>`. You can also just simply enter the email address `git@example.com`.
|
||||||
|
|
||||||
|
If your password contains special characters, you should include single quotation marks (`'`) on both sides of your password.
|
||||||
|
|
||||||
|
```
|
||||||
|
[mailer]
|
||||||
|
ENABLED = true
|
||||||
|
FROM =
|
||||||
|
PROTOCOL =
|
||||||
|
SMTP_ADDR =
|
||||||
|
SMTP_PORT =
|
||||||
|
USER =
|
||||||
|
PASSWD =
|
||||||
|
```
|
||||||
|
|
||||||
|
### Other Settings
|
||||||
|
|
||||||
|
See the [Cheat Sheet](https://docs.gitea.com/administration/config-cheat-sheet) for explanations of more configuration items such as SSL, Git LFS, and Oauth.
|
||||||
|
|
||||||
|
## End
|
||||||
|
|
||||||
|
Now, enjoy your Gitea - git with a cup of tea!
|
||||||
|
|
||||||
|
[^1]: Podman Official Docs
|
||||||
|
https://podman.io/docs/installation
|
||||||
|
[^2]: Podman Compose Github Repository
|
||||||
|
https://github.com/containers/podman-compose
|
||||||
|
[^3]: Gitea Official Docs: *Installation with Docker*
|
||||||
|
https://docs.gitea.com/installation/install-with-docker
|
||||||
|
[^4]: Gitea Official Docs: *Email setup*
|
||||||
|
https://docs.gitea.com/administration/email-setup
|
14
content/en/search.md
Normal file
14
content/en/search.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: Search
|
||||||
|
slug: search
|
||||||
|
layout: search
|
||||||
|
outputs:
|
||||||
|
- html
|
||||||
|
- json
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 3
|
||||||
|
params:
|
||||||
|
icon: search
|
||||||
|
---
|
8
content/zh-cn/_index.md
Normal file
8
content/zh-cn/_index.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
name: 首页
|
||||||
|
weight: 1
|
||||||
|
params:
|
||||||
|
icon: home
|
||||||
|
---
|
13
content/zh-cn/about.md
Normal file
13
content/zh-cn/about.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: "关于"
|
||||||
|
slug: "关于"
|
||||||
|
date: 2024-01-28
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 5
|
||||||
|
params:
|
||||||
|
icon: user
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🏗️ 很快就好
|
11
content/zh-cn/archives.md
Normal file
11
content/zh-cn/archives.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: 归档
|
||||||
|
layout: archives
|
||||||
|
slug: 归档
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 2
|
||||||
|
params:
|
||||||
|
icon: archives
|
||||||
|
---
|
131
content/zh-cn/post/deploy-gitea-using-podman-on-linux.md
Normal file
131
content/zh-cn/post/deploy-gitea-using-podman-on-linux.md
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
---
|
||||||
|
title: 使用 Podman 在 Linux 上部署 Gitea
|
||||||
|
date: 2025-01-03
|
||||||
|
categories: [科技, 自托管]
|
||||||
|
image: https://cdn.sunyz.net/assets/blog/banners/deploy-gitea-using-podman-on-linux.zh-cn.webp
|
||||||
|
---
|
||||||
|
|
||||||
|
**声明:如本文之中、英文版本有任何歧义,均以英文版为准。我们会尽力保证中文版的准确性。**
|
||||||
|
|
||||||
|
Gitea 是一个轻量级的自托管 DevOps 平台,提供 Git 托管、代码审查、团队协作、软件包注册和 CI/CD 等功能。
|
||||||
|
为确保 Gitea 满足您的需求,建议在安装前阅读 Gitea 与其他竞品(如 GitLab 社区版)的[对照表](https://docs.gitea.com/installation/comparison)。
|
||||||
|
|
||||||
|
## 安装 Podman [^1]
|
||||||
|
|
||||||
|
Podman 可以通过包管理器安装(推荐)或手动从源代码构建。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Debian & Ubuntu
|
||||||
|
sudo apt-get install podman
|
||||||
|
# Arch & Manjaro
|
||||||
|
sudo pacman -S podman
|
||||||
|
# Alpine
|
||||||
|
sudo apk add podman
|
||||||
|
```
|
||||||
|
|
||||||
|
如果您使用的是 RHEL,请参阅 Red Hat 知识库中对应的[文档](https://access.redhat.com/solutions/3650231)。
|
||||||
|
|
||||||
|
## 安装 Podman Compose [^2]
|
||||||
|
|
||||||
|
Podman 本体不支持 [Compose 规范](https://compose-spec.io)。要使用类似 Docker Compose 的功能,我们需要安装一个由社区维护的实用程序 Podman Compose。
|
||||||
|
|
||||||
|
另,Podman 原生支持 Kubernetes,您也可以使用 Kubernetes 的配置文件来运行 Gitea。
|
||||||
|
|
||||||
|
建议使用 pip(Python 的包管理器)安装 Podman Compose。
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo apt-get install python3-pip -y
|
||||||
|
pip3 install podman-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
如果遇到 *externally-managed-environment* 的错误,可以尝试以下两种解决方案。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 使用 pipx
|
||||||
|
sudo apt-get install pipx -y
|
||||||
|
sudo pipx ensurepath --global
|
||||||
|
pipx install podman-compose
|
||||||
|
|
||||||
|
# 创建虚拟环境
|
||||||
|
# 若使用此方法,您只能在当前文件夹中使用 podman-compose
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install podman-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
## 撰写 Compose 文件 [^3]
|
||||||
|
|
||||||
|
Podman Compose 使用与 Docker Compose 相同的语法。因此您甚至可以直接复制 Gitea 官方文档中的 docker-compose.yml 文件。
|
||||||
|
|
||||||
|
以下是我的 Compose 文件,供参考。
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: docker.io/gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
volumes:
|
||||||
|
- /usr/local/gitea/data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
```
|
||||||
|
|
||||||
|
使用上述配置需要执行以下命令。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 创建 Gitea 的目录
|
||||||
|
mkdir /usr/local/gitea /usr/local/gitea/data
|
||||||
|
# 允许容器对数据文件夹进行读写
|
||||||
|
chown 1000:1000 /usr/local/gitea/data
|
||||||
|
# 运行 podman compose
|
||||||
|
podman-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
注意:Gitea 默认使用 SQLite 数据库。如果需要使用外部数据库(MySQL 或 PostgreSQL),请在 Gitea 配置部分后添加相应的配置。
|
||||||
|
|
||||||
|
## 配置 Gitea
|
||||||
|
|
||||||
|
在启动容器后,您应该访问 `http://SERVER_IP:3000`,并按照安装向导进行操作。第一个注册的用户将成为站点管理员。
|
||||||
|
|
||||||
|
此后,您可以在 `CUSTOM_FOLDER/gitea/conf/app.ini` 中找到 Gitea 的配置文件,其中包含您之前在安装向导中输入的设置信息。
|
||||||
|
|
||||||
|
### 邮件通知 [^4]
|
||||||
|
|
||||||
|
Gitea 支持以下协议:smtp、smtps、smtp+starttls、smtp+unix、sendmail、dummy。最常用的是 smtps,如果不确定使用哪种协议,请选择 smtps。
|
||||||
|
|
||||||
|
FROM 属性的值应为类似`发件人名称 <电子邮件地址>`的格式,例如 `Gitea <git@example.com>`。您也可以直接输入电子邮件地址 `git@example.com`。
|
||||||
|
|
||||||
|
如果您的密码包含特殊字符,请在密码两侧加上单引号 (`'`)。
|
||||||
|
|
||||||
|
```
|
||||||
|
[mailer]
|
||||||
|
ENABLED = true
|
||||||
|
FROM =
|
||||||
|
PROTOCOL =
|
||||||
|
SMTP_ADDR =
|
||||||
|
SMTP_PORT =
|
||||||
|
USER =
|
||||||
|
PASSWD =
|
||||||
|
```
|
||||||
|
|
||||||
|
### 其他设置
|
||||||
|
|
||||||
|
请查阅[配置说明](https://docs.gitea.com/zh-cn/administration/config-cheat-sheet)以了解更多配置项的说明,例如 SSL、Git LFS 和 Oauth。
|
||||||
|
|
||||||
|
## 结语
|
||||||
|
|
||||||
|
现在,您可以使用您的 Gitea 实例了。
|
||||||
|
|
||||||
|
[^1]: Podman 官方文档
|
||||||
|
https://podman.io/docs/installation
|
||||||
|
[^2]: Podman Compose Github 仓库
|
||||||
|
https://github.com/containers/podman-compose
|
||||||
|
[^3]: Gitea 官方文档:*使用 Docker 安装*
|
||||||
|
https://docs.gitea.com/zh-cn/installation/install-with-docker
|
||||||
|
[^4]: Gitea 官方文档:*Email 设置*
|
||||||
|
https://docs.gitea.com/zh-cn/administration/email-setup
|
14
content/zh-cn/search.md
Normal file
14
content/zh-cn/search.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: 搜索
|
||||||
|
slug: 搜索
|
||||||
|
layout: search
|
||||||
|
outputs:
|
||||||
|
- html
|
||||||
|
- json
|
||||||
|
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: 3
|
||||||
|
params:
|
||||||
|
icon: search
|
||||||
|
---
|
5
data/Build.json
Normal file
5
data/Build.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"ID": "114514",
|
||||||
|
"URL": "https://example.com",
|
||||||
|
"Channel": "development"
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Seven's Blog</title><link>https://sunyz.net/en/categories/</link><description>Recent content in Categories on Seven's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://sunyz.net/en/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
|
@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seven's Blog</title><link>https://sunyz.net/en/</link><description>Recent content on Seven's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 28 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://sunyz.net/en/index.xml" rel="self" type="application/rss+xml"/><item><title>About</title><link>https://sunyz.net/en/about/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/about/</guid><description>🏗️ Just a minute</description></item><item><title>Keep in Touch</title><link>https://sunyz.net/en/keep_in_touch/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/keep_in_touch/</guid><description>Conditions You (and your website) must NOT infringe on the copyrights of others. Your website is operational most of the time. No FREE domain suffixes$^*$ nor non-ASCII domain suffixes acceptable. $^*$ domains registered on freenom.com, and/or subdomains excluded from the list.
|
|
||||||
My datas 1 2 3 4 Name: Seven SUN Link: https://sunyz.net/ Desc: The next time we may meet anywhere, but we are always as brilliant as a sea of stars.</description></item><item><title>Links</title><link>https://sunyz.net/en/links/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/links/</guid><description>Please visit &ldquo;Keep in Touch&rdquo; page to add new links or modify existing datas.</description></item><item><title>Once again, "Hello World!"</title><link>https://sunyz.net/en/p/once-again-hello-world/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/p/once-again-hello-world/</guid><description/></item><item><title>Archives</title><link>https://sunyz.net/en/archives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/archives/</guid><description/></item><item><title>Search</title><link>https://sunyz.net/en/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/search/</guid><description/></item></channel></rss>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Seven's Blog</title><link>https://sunyz.net/en/post/</link><description>Recent content in Posts on Seven's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 28 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://sunyz.net/en/post/index.xml" rel="self" type="application/rss+xml"/><item><title>Once again, "Hello World!"</title><link>https://sunyz.net/en/p/once-again-hello-world/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/en/p/once-again-hello-world/</guid><description/></item></channel></rss>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sunyz.net/en/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/"/></url><url><loc>https://sunyz.net/en/about/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E5%85%B3%E4%BA%8E%E6%88%91/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/about/"/></url><url><loc>https://sunyz.net/en/keep_in_touch/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/keep_in_touch/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/keep_in_touch/"/></url><url><loc>https://sunyz.net/en/links/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/links/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/links/"/></url><url><loc>https://sunyz.net/en/p/once-again-hello-world/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/p/once-again-hello-world/"/></url><url><loc>https://sunyz.net/en/post/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/post/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/post/"/></url><url><loc>https://sunyz.net/en/archives/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E5%AD%98%E6%A1%A3/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/archives/"/></url><url><loc>https://sunyz.net/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/categories/"/></url><url><loc>https://sunyz.net/en/search/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E6%90%9C%E7%B4%A2/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/search/"/></url><url><loc>https://sunyz.net/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/tags/"/></url></urlset>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on Seven's Blog</title><link>https://sunyz.net/en/tags/</link><description>Recent content in Tags on Seven's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://sunyz.net/en/tags/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
|
19
getCommitID.sh
Normal file
19
getCommitID.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
BUILD_ID=$(git rev-parse --short HEAD)
|
||||||
|
BUILD_URL="https://git.sunyz.net/realSunyz/pub.seven.blog/commit/$BUILD_ID"
|
||||||
|
|
||||||
|
if [ "$CF_PAGES_BRANCH" = "main" ]; then
|
||||||
|
BUILD_CHANNEL="production"
|
||||||
|
elif [ "$CF_PAGES_BRANCH" = "dev" ]; then
|
||||||
|
BUILD_CHANNEL="development"
|
||||||
|
else
|
||||||
|
BUILD_CHANNEL="unknown"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF > data/Build.json
|
||||||
|
{
|
||||||
|
"ID": "$BUILD_ID",
|
||||||
|
"URL": "$BUILD_URL",
|
||||||
|
"Channel": "$BUILD_CHANNEL"
|
||||||
|
}
|
||||||
|
EOF
|
@ -1,2 +0,0 @@
|
|||||||
<!doctype html><html lang=en><head><title>https://sunyz.net/zh-cn/</title>
|
|
||||||
<link rel=canonical href=https://sunyz.net/zh-cn/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://sunyz.net/zh-cn/"></head></html>
|
|
6
public/_headers
Normal file
6
public/_headers
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
https://blog.sunyz.dev/*
|
||||||
|
X-Frame-Options: SAMEORIGIN
|
||||||
|
X-Content-Type-Options: nosniff
|
||||||
|
Referrer-Policy: strict-origin-when-cross-origin
|
||||||
|
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
|
||||||
|
Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://sunyz.net/en/sitemap.xml</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod></sitemap><sitemap><loc>https://sunyz.net/zh-cn/sitemap.xml</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod></sitemap></sitemapindex>
|
|
1
themes/hugo-theme-stack
Submodule
1
themes/hugo-theme-stack
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit f5cbf84768120e8dd573056093966767f313077f
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Seven 的日记本</title><link>https://sunyz.net/zh-cn/categories/</link><description>Recent content in Categories on Seven 的日记本</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://sunyz.net/zh-cn/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seven 的日记本</title><link>https://sunyz.net/zh-cn/</link><description>Recent content on Seven 的日记本</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Sun, 28 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://sunyz.net/zh-cn/index.xml" rel="self" type="application/rss+xml"/><item><title>串个门</title><link>https://sunyz.net/zh-cn/keep_in_touch/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/keep_in_touch/</guid><description>条件 您(与您的网站)不得侵犯他人版权。 您的网站多数时候都能正常访问。 不接受 免费 域名后缀$^*$ 或 non-ASCII 域名后缀。 $^*$ 特指于 freenom.com 注册的域名, 与/或 不在</description></item><item><title>关于我</title><link>https://sunyz.net/zh-cn/%E5%85%B3%E4%BA%8E%E6%88%91/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/%E5%85%B3%E4%BA%8E%E6%88%91/</guid><description>🏗️ 很快就好</description></item><item><title>友链</title><link>https://sunyz.net/zh-cn/links/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/links/</guid><description>请前往“串个门”页面以添加新链接或维护现有信息。</description></item><item><title>再一次,“你好,世界!”</title><link>https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/</guid><description/></item><item><title>存档</title><link>https://sunyz.net/zh-cn/%E5%AD%98%E6%A1%A3/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/%E5%AD%98%E6%A1%A3/</guid><description/></item><item><title>搜索</title><link>https://sunyz.net/zh-cn/%E6%90%9C%E7%B4%A2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/%E6%90%9C%E7%B4%A2/</guid><description/></item></channel></rss>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Seven 的日记本</title><link>https://sunyz.net/zh-cn/post/</link><description>Recent content in Posts on Seven 的日记本</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Sun, 28 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://sunyz.net/zh-cn/post/index.xml" rel="self" type="application/rss+xml"/><item><title>再一次,“你好,世界!”</title><link>https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/</guid><description/></item></channel></rss>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sunyz.net/zh-cn/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/"/></url><url><loc>https://sunyz.net/zh-cn/post/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/post/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/post/"/></url><url><loc>https://sunyz.net/zh-cn/keep_in_touch/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/keep_in_touch/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/keep_in_touch/"/></url><url><loc>https://sunyz.net/zh-cn/%E5%85%B3%E4%BA%8E%E6%88%91/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/about/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E5%85%B3%E4%BA%8E%E6%88%91/"/></url><url><loc>https://sunyz.net/zh-cn/links/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/links/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/links/"/></url><url><loc>https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/</loc><lastmod>2024-01-28T00:00:00+00:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/p/once-again-hello-world/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/p/%E5%86%8D%E4%B8%80%E6%AC%A1%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C/"/></url><url><loc>https://sunyz.net/zh-cn/categories/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/categories/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/categories/"/></url><url><loc>https://sunyz.net/zh-cn/tags/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/tags/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/tags/"/></url><url><loc>https://sunyz.net/zh-cn/%E5%AD%98%E6%A1%A3/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/archives/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E5%AD%98%E6%A1%A3/"/></url><url><loc>https://sunyz.net/zh-cn/%E6%90%9C%E7%B4%A2/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sunyz.net/en/search/"/><xhtml:link rel="alternate" hreflang="zh-cn" href="https://sunyz.net/zh-cn/%E6%90%9C%E7%B4%A2/"/></url></urlset>
|
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on Seven 的日记本</title><link>https://sunyz.net/zh-cn/tags/</link><description>Recent content in Tags on Seven 的日记本</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://sunyz.net/zh-cn/tags/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
|
Loading…
Reference in New Issue
Block a user