“Gitea”的版本间的差异

来自wrc's Wiki
跳到导航 跳到搜索
 
第10行: 第10行:
 
;更改默认主题为暗色主题
 
;更改默认主题为暗色主题
 
: 在 <code>[ui]</code> section 中添加 <code>DEFAULT_THEME = arc-green</code> <ref>https://docs.gitea.io/en-us/customizing-gitea/#customizing-the-look-of-gitea</ref>
 
: 在 <code>[ui]</code> section 中添加 <code>DEFAULT_THEME = arc-green</code> <ref>https://docs.gitea.io/en-us/customizing-gitea/#customizing-the-look-of-gitea</ref>
 +
;延长 remember me 的时间
 +
: 在 <code>[security]</code> section 中添加 <code>LOGIN_REMEMBER_DAYS = 100</code> <ref>https://github.com/go-gitea/gitea/issues/778#issuecomment-459977284</ref>
 
;robots.txt
 
;robots.txt
 
: 将 robots.txt 的内容写入 <code>/var/lib/gitea/custom/robots.txt</code> <ref>https://docs.gitea.io/en-us/search-engines-indexation/</ref>
 
: 将 robots.txt 的内容写入 <code>/var/lib/gitea/custom/robots.txt</code> <ref>https://docs.gitea.io/en-us/search-engines-indexation/</ref>

2021年10月24日 (日) 14:09的最新版本

Gitea 是一个用 Go 语言写的代码托管软件。

配置

禁止注册
[service] section 中添加 DISABLE_REGISTRATION = true
本地监听
[server] section 中添加 HTTP_ADDR = 127.0.0.1
更改默认主题为暗色主题
[ui] section 中添加 DEFAULT_THEME = arc-green [1]
延长 remember me 的时间
[security] section 中添加 LOGIN_REMEMBER_DAYS = 100 [2]
robots.txt
将 robots.txt 的内容写入 /var/lib/gitea/custom/robots.txt [3]

Ubuntu Server 中安装

[4]

添加 key

curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key

添加 repo

echo "deb [arch=amd64] https://packaging.gitlab.io/gitea gitea main" | sudo tee /etc/apt/sources.list.d/morph027-gitea.list

安装

sudo apt update
sudo apt install gitea

参考资料