Browse Source

进行公开发布的修改(2)

1. 同步public文件
2. 同步template文件
3. 同步i18n翻译文件
4. 添加文档
SongZihuan 2 tháng trước cách đây
mục cha
commit
bb6d61fde7
100 tập tin đã thay đổi với 377 bổ sung439 xóa
  1. 12 8
      README.md
  2. 2 0
      conf/locale/locale_zh-CN.ini
  3. 2 0
      conf/locale/locale_zh-HK.ini
  4. 2 0
      conf/locale/locale_zh-TW.ini
  5. 4 0
      docs/README.md
  6. 0 21
      docs/admin/lfs.md
  7. 0 33
      docs/admin/release_strategy.md
  8. 355 0
      docs/config/CONFIG.md
  9. 0 131
      docs/dev/database_schema.md
  10. 0 17
      docs/dev/import_locale.md
  11. 0 174
      docs/dev/local_development.md
  12. 0 28
      docs/user/lfs.md
  13. 0 2
      internal/conf/conf.go
  14. 0 6
      internal/conf/static.go
  15. 0 1
      internal/context/context.go
  16. 0 3
      internal/template/template.go
  17. 0 3
      public/assets/font-awesome-4.6.3/css/font-awesome.min.css
  18. BIN
      public/assets/font-awesome-4.6.3/fonts/FontAwesome.otf
  19. 0 0
      public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.svg
  20. BIN
      public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf
  21. BIN
      public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.woff
  22. 0 0
      public/css/gogs.min.css
  23. 0 0
      public/css/gogs.min.css.map
  24. 0 12
      public/embed.go
  25. BIN
      public/img/avatar_default.png
  26. BIN
      public/img/checkmark.png
  27. BIN
      public/img/dingtalk.png
  28. BIN
      public/img/emoji/+1.png
  29. BIN
      public/img/emoji/-1.png
  30. BIN
      public/img/emoji/100.png
  31. BIN
      public/img/emoji/1234.png
  32. BIN
      public/img/emoji/8ball.png
  33. BIN
      public/img/emoji/a.png
  34. BIN
      public/img/emoji/ab.png
  35. BIN
      public/img/emoji/abc.png
  36. BIN
      public/img/emoji/abcd.png
  37. BIN
      public/img/emoji/accept.png
  38. BIN
      public/img/emoji/aerial_tramway.png
  39. BIN
      public/img/emoji/airplane.png
  40. BIN
      public/img/emoji/alarm_clock.png
  41. BIN
      public/img/emoji/alien.png
  42. BIN
      public/img/emoji/ambulance.png
  43. BIN
      public/img/emoji/anchor.png
  44. BIN
      public/img/emoji/angel.png
  45. BIN
      public/img/emoji/anger.png
  46. BIN
      public/img/emoji/angry.png
  47. BIN
      public/img/emoji/anguished.png
  48. BIN
      public/img/emoji/ant.png
  49. BIN
      public/img/emoji/apple.png
  50. BIN
      public/img/emoji/aquarius.png
  51. BIN
      public/img/emoji/aries.png
  52. BIN
      public/img/emoji/arrow_backward.png
  53. BIN
      public/img/emoji/arrow_double_down.png
  54. BIN
      public/img/emoji/arrow_double_up.png
  55. BIN
      public/img/emoji/arrow_down.png
  56. BIN
      public/img/emoji/arrow_down_small.png
  57. BIN
      public/img/emoji/arrow_forward.png
  58. BIN
      public/img/emoji/arrow_heading_down.png
  59. BIN
      public/img/emoji/arrow_heading_up.png
  60. BIN
      public/img/emoji/arrow_left.png
  61. BIN
      public/img/emoji/arrow_lower_left.png
  62. BIN
      public/img/emoji/arrow_lower_right.png
  63. BIN
      public/img/emoji/arrow_right.png
  64. BIN
      public/img/emoji/arrow_right_hook.png
  65. BIN
      public/img/emoji/arrow_up.png
  66. BIN
      public/img/emoji/arrow_up_down.png
  67. BIN
      public/img/emoji/arrow_up_small.png
  68. BIN
      public/img/emoji/arrow_upper_left.png
  69. BIN
      public/img/emoji/arrow_upper_right.png
  70. BIN
      public/img/emoji/arrows_clockwise.png
  71. BIN
      public/img/emoji/arrows_counterclockwise.png
  72. BIN
      public/img/emoji/art.png
  73. BIN
      public/img/emoji/articulated_lorry.png
  74. BIN
      public/img/emoji/astonished.png
  75. BIN
      public/img/emoji/atm.png
  76. BIN
      public/img/emoji/b.png
  77. BIN
      public/img/emoji/baby.png
  78. BIN
      public/img/emoji/baby_bottle.png
  79. BIN
      public/img/emoji/baby_chick.png
  80. BIN
      public/img/emoji/baby_symbol.png
  81. BIN
      public/img/emoji/back.png
  82. BIN
      public/img/emoji/baggage_claim.png
  83. BIN
      public/img/emoji/balloon.png
  84. BIN
      public/img/emoji/ballot_box_with_check.png
  85. BIN
      public/img/emoji/bamboo.png
  86. BIN
      public/img/emoji/banana.png
  87. BIN
      public/img/emoji/bangbang.png
  88. BIN
      public/img/emoji/bank.png
  89. BIN
      public/img/emoji/bar_chart.png
  90. BIN
      public/img/emoji/barber.png
  91. BIN
      public/img/emoji/baseball.png
  92. BIN
      public/img/emoji/basketball.png
  93. BIN
      public/img/emoji/bath.png
  94. BIN
      public/img/emoji/bathtub.png
  95. BIN
      public/img/emoji/battery.png
  96. BIN
      public/img/emoji/bear.png
  97. BIN
      public/img/emoji/bee.png
  98. BIN
      public/img/emoji/beer.png
  99. BIN
      public/img/emoji/beers.png
  100. BIN
      public/img/emoji/beetle.png

+ 12 - 8
README.md

@@ -6,18 +6,22 @@
 
 例如增加了功能:
 
-- 公共邮件和主邮件分开
-- 优化邮件服务TLS握手过程
-- 更新用户权限、登录逻辑判断
-- 更新用户仓库创建逻辑(例如可以开启允许管理员无限制创建,而一般注册用户只能查看)
-- 允许限制用户探索其他用户的逻辑(Explore 发现页面 可以对一般用户不展示其他用户)
-- 修复了一些Bug
+- 公共邮件和主邮件分开
+- 优化邮件服务TLS握手过程
+- 更新用户权限、登录逻辑判断
+- 更新用户仓库创建逻辑(例如可以开启允许管理员无限制创建,而一般注册用户只能查看)
+- 允许限制用户探索其他用户的逻辑(Explore 发现页面 可以对一般用户不展示其他用户)
+- 修复了一些Bug
 
 ## 关于 Gogs
 
-可以访问 Gogs 的官网获得更多介绍:[gogs.io](https://gogs.io/)
+可以访问 Gogs 的官网获得更多介绍:[gogs.io](https://gogs.io/)
 
-也可以访问其 Github 仓库获取更多介绍:[github.com/gogs/gogs](https://github.com/gogs/gogs)
+也可以访问其 Github 仓库获取更多介绍:[github.com/gogs/gogs](https://github.com/gogs/gogs)。
+
+## 使用文档
+
+文档请查看此处:[点击前往](./docs/README.md)。
 
 ## 授权许可
 

+ 2 - 0
conf/locale/locale_zh-CN.ini

@@ -314,8 +314,10 @@ manage_emails=管理邮箱地址
 email_desc=您的主要邮箱地址将被用于通知提醒和其它操作,公开邮件地址用于公开展示用途。
 primary=主要
 public=公开
+anonymous=匿名
 primary_email=设为主要
 public_email=设为公开
+anonymous_email=使用匿名
 delete_email=删除
 email_deletion=邮箱删除操作
 email_deletion_desc=删除该邮箱地址将会移除所有相关的信息。是否继续?

+ 2 - 0
conf/locale/locale_zh-HK.ini

@@ -314,8 +314,10 @@ manage_emails=管理電子郵件地址
 email_desc=您的主要電子郵件地址将被用于通知提醒和其它操作,公开電子郵件地址用于公开展示用途。
 primary=主要
 public=公开
+anonymous=匿名
 primary_email=设为主要
 public_email=设为公开
+anonymous_email=使用匿名
 delete_email=刪除
 email_deletion=刪除郵箱
 email_deletion_desc=刪除該郵箱地址將會移除所有相關的信息。是否繼續?

+ 2 - 0
conf/locale/locale_zh-TW.ini

@@ -314,8 +314,10 @@ manage_emails=管理電子郵件地址
 email_desc=您的主要電子郵件地址将被用于通知提醒和其它操作,公开電子郵件地址用于公开展示用途。
 primary=主要
 public=公开
+anonymous=匿名
 primary_email=设为主要
 public_email=设为公开
+anonymous_email=使用匿名
 delete_email=刪除
 email_deletion=刪除郵箱
 email_deletion_desc=刪除該郵箱地址將會移除所有相關的信息。是否繼續?

+ 4 - 0
docs/README.md

@@ -0,0 +1,4 @@
+# Huan-Gogs 文档
+## 目录
+
+- [配置文件介绍](./config/CONFIG.md)

+ 0 - 21
docs/admin/lfs.md

@@ -1,21 +0,0 @@
-# Configuring Git Large File Storage (LFS)
-
-> NOTE: Git LFS is supported in Gogs starting with version 0.12.
-
-Git LFS works out of box with default configuration for any supported versions.
-
-## Known limitations
-
-- Only local storage is supported (i.e. all LFS objects are stored on the same server where Gogs runs), support of Object Storage Service like Amazon S3 is being tracked in [#6065](https://github.com/gogs/gogs/issues/6065).
-
-## Configuration
-
-All configuration options for Git LFS are located in [`[lfs]` section](https://github.com/gogs/gogs/blob/44ea9604ed7440c2cf1105d965c2429ee225e8f6/conf/app.ini#L266-L270):
-
-```ini
-[lfs]
-; The storage backend for uploading new objects.
-STORAGE = local
-; The root path to store LFS objects on local file system.
-OBJECTS_PATH = data/lfs-objects
-```

+ 0 - 33
docs/admin/release_strategy.md

@@ -1,33 +0,0 @@
-# Release strategy
-
-## Semantic versioning
-
-Starting 0.12.0, Gogs uses [semantic versioning](https://semver.org/) for publishing releases. For example:
-
-- `0.12.0` is a minor version release.
-- `0.12.1` is the first patch release of `0.12`.
-- `0.12` indicates a series of releases for a minor version and its patch releases.
-
-Each minor release has its own release branch with prefix `release/`, e.g. `release/0.12` is the release branch for minor version 0.12.0 and all its patch releases (`0.12.1`, `0.12.2`, etc.).
-
-## Backwards compatibility
-
-### Before 0.12
-
-If you're running Gogs with any version below 0.12, please upgrade to 0.12 to run necessary migrations.
-
-### Since 0.12
-
-We maintain one minor version backwards compatibility, patch releases are disregarded.
-
-For example, you should:
-
-- Upgrade from `0.12.0` to `0.13.0`.
-- Upgrade from `0.12.1` to `0.13.4`.
-- NOT upgrade from `0.12.4` to `0.14.0`.
-
-Therefore, we recommend upgrade one minor version at a time.
-
-### Running source builds
-
-If you're running Gogs with building from source code, we recommend you update at least weekly to be not fall behind and potentially miss migrations.

+ 355 - 0
docs/config/CONFIG.md

@@ -0,0 +1,355 @@
+---
+name: 配置文件手册
+---
+
+# 配置文件手册
+
+本手册会详尽地描述有关 Gogs 配置文件的选项,帮助您更好地理解和使用 Gogs。
+
+请记住,任何修改都是发生在 `custom/conf/app.ini` 自定义配置文件中,该文件的具体位置与您的设置有关。
+
+完整的默认设置可以通过 [app.ini](https://github.com/gogs/gogs/blob/main/conf/app.ini) 文件查看。如果您看到类似 `%(X)s` 字符,这是由 [ini](https://ini.unknwon.io/docs/howto/work_with_values#recursive-values) 提供的递归取值的特性。
+
+### 概览
+
+| 名称         | 描述                                                                              |
+|------------|---------------------------------------------------------------------------------|
+| `APP_NAME` | 应用名称,可以改成您的组织或公司名称                                                              |
+| `RUN_USER` | 运行应用的用户名称,我们建议您使用 `git`,但如果您在个人计算机上运行 Gogs,请修改为您的系统用户名称。如果没有正确设置这个值,很可能导致您的应用崩溃 |
+| `RUN_MODE` | 鉴于性能和其它考虑,建议在部署环境下修改为 `prod` 模式。在您完成安装操作时,该值也会被设置为 `prod`                       |
+
+### 服务器 (`server`)
+
+| 名称                                 | 描述                                                                             |
+|------------------------------------|--------------------------------------------------------------------------------|
+| `PROXY_PROTO`                      | `true`或`false`,表示是否监听时支持TCP转发协议(仅`PROTOCOL`为http或https有限)                      |
+| `PROTOCOL`                         | `http` 或 `https`                                                               |
+| `DOMAIN`                           | 服务器域名                                                                          |
+| `ROOT_URL`                         | 公开的完整 URL 路径                                                                   |
+| `HTTP_ADDR`                        | 应用 HTTP 监听地址                                                                   |
+| `HTTP_PORT`                        | 应用 HTTP 监听端口号                                                                  |
+| `UNIX_SOCKET_PERMISSION`           | Unix 套接字文件的权限                                                                  |
+| `LOCAL_ROOT_URL`                   | 用于 Gogs 工作进程(如:SSH)回访应用的本地(DMZ)URL,一般情况下请保持默认值,除非您的 SSH 服务器节点与 HTTP 并不是同一个节点入口 |
+| `DISABLE_SSH`                      | 当 SSH 功能不可用时可以禁用                                                               |
+| `START_SSH_SERVER`                 | 启用该选项来启动内置 SSH 服务器                                                             |
+| `SSH_DOMAIN`                       | 允许公用网络访问 SSH 的域名                                                               |
+| `SSH_PORT`                         | SSH 端口号,如果不为 `22` 的话可以在此修改                                                     |
+| `SSH_LISTEN_HOST`                  | 内置 SSH 服务器监听的地址                                                                |
+| `SSH_LISTEN_PORT`                  | 内置 SSH 服务器监听的端口                                                                |
+| `SSH_ROOT_PATH`                    | SSH 根目录,一般为 `~/.ssh`,但必须填写为 `/home/git/.ssh`                                   |
+| `REWRITE_AUTHORIZED_KEYS_AT_START` | 激活该选项以在应用启动时自动重写 `authorized_keys` 文件,该选项在使用内置 SSH 服务器时将会被自动禁用                 |
+| `SSH_KEY_TEST_PATH`                | 用于测试 SSH 公钥的临时目录                                                               |
+| `SSH_KEYGEN_PATH`                  | `ssh-keygen` 程序的路径,默认为 `ssh-keygen` 即通过系统路径查找                                  |
+| `MINIMUM_KEY_SIZE_CHECK`           | 指定不同类型的公钥的最小密钥大小                                                               |
+| `OFFLINE_MODE`                     | 激活该选项来禁止从 CDN 获取静态资源,同时 Gravatar 服务也将被自动禁用                                     |
+| `DISABLE_ROUTER_LOG`               | 激活该选项来禁止打印路由日志                                                                 |
+| `CERT_FILE`                        | HTTPS 授权文件路径                                                                   |
+| `KEY_FILE`                         | HTTPS 的密钥文件路径                                                                  |
+| `STATIC_ROOT_PATH`                 | 模板文件和静态文件的上级目录,默认为应用二进制所在的位置                                                   |
+| `APP_DATA_PATH`                    | 应用内部数据的存放目录                                                                    |
+| `ENABLE_GZIP`                      | 激活该选项来启用应用级别 GZIP 支持                                                           |
+| `LANDING_PAGE`                     | 未登录用户的默认首页,可以是 `home` 或 `explore`(探索页)                                         |
+
+### 仓库 (`repository`)
+
+| 名称                                | 描述                                                                   |
+|-----------------------------------|----------------------------------------------------------------------|
+| `ROOT`                            | 用户仓库存储根目录,必须为绝对路径,默认为 `~/<user name>/gogs-repositories`              |
+| `SCRIPT_TYPE`                     | 系统脚本类型,一般情况下均为 `bash`,但有些用户反应只能使用 `sh`                               |
+| `ANSI_CHARSET`                    | 当遇到无法识别的字符集时使用的默认字符集                                                 |
+| `FORCE_PRIVATE`                   | 强制要求所有新建的仓库都是私有的                                                     |
+| `ADMIN_NOT_CREATION_LIMIT`        | 若为`true`则管理员无限制创建仓库                                                  |
+| `ORGANIZATION_NOT_CREATION_LIMIT` | 若为`true`则组织可以无限制创建仓库(`admin.DISABLE_REGULAR_ORG_CREATION`为`true`时才生效 |
+| `MAX_CREATION_LIMIT`              | 全局默认的每个用户可创建创建仓库上限,`-1` 表示无限制                                        |
+| `PREFERRED_LICENSES`              | 建议用户首选的授权类型                                                          |
+| `DISABLE_HTTP_GIT`                | 激活该选项来禁止用户通过 HTTP 对 Git 仓库进行交互操作,即用户只能通过 SSH 操作                      |
+| `ENABLE_LOCAL_PATH_MIGRATION`     | 激活该选项来启用本地路径迁移仓库功能。启动后默认只有管理员可以使用,普通用户必须经由管理员授权                      |
+| `ENABLE_RAW_FILE_RENDER_MODE`     | 激活该选项来启用在查看原始数据时对页面进行真实渲染,例如渲染实际的 HTML 页面,有潜在安全隐患                    |
+
+#### 仓库 - 编辑器 (`repository.editor`)
+
+| 名称                     | 描述                                                    |
+|------------------------|-------------------------------------------------------|
+| `LINE_WRAP_EXTENSIONS` | 需要显示为行包装的文件名后缀,通过逗号分隔。如果是无后缀名的文件,则单独放置一个逗号,例如:`.txt,` |
+
+#### 仓库 - 文件上传 (`repository.upload`)
+
+| 名称              | 描述                                                    |
+|-----------------|-------------------------------------------------------|
+| `ENABLED`       | 激活该选项来启用仓库文件上传功能                                      |
+| `TEMP_PATH`     | 文件上传的临时存放目录                                           |
+| `ALLOWED_TYPES` | 允许上传的文件类型(例如:"image/jpeg\|image/png"),留空表示允许上传任意类型的文件 |
+| `FILE_MAX_SIZE` | 单个上传的文件的最大体积,以 MB 为单位                                 |
+| `MAX_FILES`     | 单次同时上传的最多文件个数                                         |
+
+#### 版本发布 - 附件 (`release.attachment`)
+
+| 名称              | 描述                                                          |
+|-----------------|-------------------------------------------------------------|
+| `ENABLED`       | 激活该选项来启用版本发布附件功能                                            |
+| `PATH`          | 存放附件的路径                                                     |
+| `ALLOWED_TYPES` | 允许上传的 MIME 类型,例如 "image/jpeg\|image/png",使用 `*/*` 允许所有类型的文件 |
+| `MAX_SIZE`      | 最大允许上传的附件体积,单位为 MB,例如 `32`                                  |
+| `MAX_FILES`     | 最大允许一次性上传的附件个数,例如 `10`                                      |
+
+### Markdown (`markdown`)
+
+| 名称                       | 描述                                                                   |
+|--------------------------|----------------------------------------------------------------------|
+| `ENABLE_HARD_LINE_BREAK` | 指示是否启用硬性换行扩展                                                         |
+| `CUSTOM_URL_SCHEMES`     | 允许被解析为链接的自定义 URL 方案,例如 `git`(用于 `git://`)和`magnet`(用于 `magnet://`)   |
+| `FILE_EXTENSIONS`        | 需要被渲染为 Markdown 格式的文件名后缀,通过逗号分隔。如果是无后缀名的文件,则单独放置一个逗号,例如:`.markdown,` |
+
+### Smartypants (`smartypants`)
+
+| 名称        | 描述                    |
+|-----------|-----------------------|
+| `ENABLED` | 指示是否启用 Smartypants 扩展 |
+
+### HTTP (`http`)
+
+| 名称                            | 描述                                                    |
+|-------------------------------|-------------------------------------------------------|
+| `ACCESS_CONTROL_ALLOW_ORIGIN` | 头信息 `Access-Control-Allow-Origin` 的自定义值,默认为空,即不响应此头信息 |
+
+### 数据库 (`database`)
+
+| 名称         | 描述                                               |
+|------------|--------------------------------------------------|
+| `DB_TYPE`  | 数据库类型,可以是 `mysql`、`postgres`、`mssql` 或 `sqlite3` |
+| `HOST`     | 数据库主机地址与端口                                       |
+| `NAME`     | 数据库名称                                            |
+| `USER`     | 数据库用户名                                           |
+| `PASSWD`   | 数据库用户密码                                          |
+| `SSL_MODE` | 仅限 PostgreSQL 使用                                 |
+| `PATH`     | 仅限 SQLite3 使用,数据库文件路径                            |
+
+### 应用管理 (`admin`)
+
+| 名称                             | 描述                       |
+|--------------------------------|--------------------------|
+| `DISABLE_REGULAR_ORG_CREATION` | 激活该选项来禁止普通用户(非管理员)创建组织   |
+| `DISABLE_REGULAR_EXPLORE_USER` | 激活该选项来禁止普通用户(非管理员)探索其他用户 |
+
+### 安全 (`security`)
+
+| 名称                                  | 描述                                             |
+|-------------------------------------|------------------------------------------------|
+| `INSTALL_LOCK`                      | 用于指示是否允许访问安装页面(该页面可以设置管理员帐号,因此该选项非常重要)         |
+| `SECRET_KEY`                        | 全局的加密密钥,**务必修改该值以确保您的服务器安全**(会在每次安装时自动生成随机字符串) |
+| `LOGIN_REMEMBER_DAYS`               | 记住登录的天数                                        |
+| `COOKIE_USERNAME`                   | 记录用户名的 Cookie 名称                               |
+| `COOKIE_REMEMBER_NAME`              | 记录用户自动登录信息的 Cookie 名称                          |
+| `REVERSE_PROXY_AUTHENTICATION_USER` | 反向代理认证用户的 Header 字段名                           |
+
+### 服务 (`service`)
+
+| 名称                                       | 描述                                                                         |
+|------------------------------------------|----------------------------------------------------------------------------|
+| `ACTIVE_CODE_LIVE_MINUTES`               | 激活码的有效期,单位为分钟                                                              |
+| `RESET_PASSWD_CODE_LIVE_MINUTES`         | 重置密码的有效期,单位为分钟                                                             |
+| `REGISTER_EMAIL_CONFIRM`                 | 激活该选项来要求注册用户必须验证邮箱,要求已启用 `Mailer`                                          |
+| `DISABLE_REGISTRATION`                   | 激活该选项来禁止用户注册功能,只能由管理员创建帐号                                                  |
+| `SHOW_REGISTRATION_BUTTON`               | 用于指示是否显示注册按钮                                                               |
+| `REQUIRE_SIGNIN_VIEW`                    | 激活该选项来要求用户必须登录才能浏览任何页面                                                     |
+| `ENABLE_CACHE_AVATAR`                    | 激活该选项来缓存 Gravatar 的头像                                                      |
+| `ENABLE_NOTIFY_MAIL`                     | 激活该选项来发送通知邮件给关注者,例如创建 issue 时,要求已启用 `Mailer`                               |
+| `ENABLE_REVERSE_PROXY_AUTHENTICATION`    | 激活该选项来开启反向代理用户认证,请从 [#165](https://github.com/gogs/gogs/issues/165) 了解更多信息 |
+| `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION` | 激活该选项来开启反向代理用户认证的自动注册功能                                                    |
+| `DISABLE_MINIMUM_KEY_SIZE_CHECK`         | 激活该选项来禁止检查响应类型的密钥最小长度                                                      |
+| `ENABLE_CAPTCHA`                         | 激活该选项以在用户注册时要求输入验证码                                                        |
+
+### Web 钩子 (`webhook`)
+
+| 名称                | 描述                                                   |
+|-------------------|------------------------------------------------------|
+| `TYPES`           | 启动的 Web 钩子类型,可以是 `gogs`、`slack`、`discord`或`dingtalk` |
+| `QUEUE_LENGTH`    | Web钩子队列长度,如果发现部分Webhook未能成功触发,可考虑增加该值                |
+| `DELIVER_TIMEOUT` | 发送通知的超时时间,以秒为单位                                      |
+| `SKIP_TLS_VERIFY` | 指示是否允许向具有非信任证书的地址发送通知                                |
+| `PAGING_NUM`      | Web 钩子历史页面每页显示记录条数                                   |
+
+### 邮件 (`mailer`)
+
+| 名称               | 描述                                                                  |
+|------------------|---------------------------------------------------------------------|
+| `ENABLED`        | 启用该选项以激活邮件服务                                                        |
+| `SUBJECT_PREFIX` | 邮件标题的前缀                                                             |
+| `HOST`           | SMTP 主机地址与端口                                                        |
+| `DISABLE_HELO`   | 禁用 HELO 操作                                                          |
+| `HELO_HOSTNAME`  | HELO 操作的自定义主机名                                                      |
+| `SKIP_VERIFY`    | 不验证自签发证书的有效性                                                        |
+| `FROM`           | 邮箱的来自地址,遵循 RFC 5322规范,可以是一个单纯的邮箱地址或者 `"名字" <email@example.com>` 的形式 |
+| `USER`           | 邮箱用户名                                                               |
+| `PASSWD`         | 邮箱密码                                                                |
+| `USE_PLAIN_TEXT` | 使用 `text/plain` 作为邮件内容格式                                            |
+
+备注:Gogs 仅支持使用 STARTTLS 的 SMTP 协议
+
+### 缓存 (`cache`)
+
+| 名称         | 描述                                                                                                                        |
+|------------|---------------------------------------------------------------------------------------------------------------------------|
+| `ADAPTER`  | 缓存引擎适配器,可以为 `memory`、`redis` 或 `memcache`。如果您使用 `redis` 或 `memcache`,请确保使用 `-tags` 选项重新构建所有依赖,例如:`go build -tags='redis'` |
+| `INTERVAL` | 仅限内存缓存使用,GC 周期,单位为秒                                                                                                       |
+| `HOST`     | 仅限 redis 和 memcache 使用,主机地址和端口号                                                                                           |
+| -          | Redis:`network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180`                              |
+| -          | Memache:`127.0.0.1:9090;127.0.0.1:9091`                                                                                   |
+
+### 会话 (`session`)
+
+| 名称                 | 描述                                                  |
+|--------------------|-----------------------------------------------------|
+| `PROVIDER`         | Session 引擎提供者,可以是 `memory`、`file`、`redis` 或 `mysql` |
+| `PROVIDER_CONFIG`  | 如果提供者为 file,则为文件根目录;如果为其它提供者,则为主机地址和端口号             |
+| `COOKIE_SECURE`    | 激活该选项以要求所有 session 操作均通过 HTTPS                      |
+| `GC_INTERVAL_TIME` | GC 周期,单位为秒                                          |
+
+### 图片 (`picture`)
+
+| 名称                        | 描述                                                                        |
+|---------------------------|---------------------------------------------------------------------------|
+| `AVATAR_UPLOAD_PATH`      | 存放用户上传头像的目录                                                               |
+| `GRAVATAR_SOURCE`         | 可以是 `gravatar`、`duoshuo` 或任何 URL,例如:`http://cn.gravatar.com/avatar/`      |
+| `DISABLE_GRAVATAR`        | 激活该选项来仅使用本地头像                                                             |
+| `ENABLE_FEDERATED_AVATAR` | 激活该选项来启用 Federated 头像服务(http://www.libravatar.org),当 Gravatar 被禁用时此选项无法生效 |
+
+### 附件 (`attachment`)
+
+| 名称              | 描述                                                          |
+|-----------------|-------------------------------------------------------------|
+| `ENABLED`       | 激活该选项以允许用户上传附件                                              |
+| `PATH`          | 存放附件的路径                                                     |
+| `ALLOWED_TYPES` | 允许上传的 MIME 类型,例如 "image/jpeg\|image/png",使用 `*/*` 允许所有类型的文件 |
+| `MAX_SIZE`      | 最大允许上传的附件体积,单位为 MB,例如 `4`                                   |
+| `MAX_FILES`     | 最大允许一次性上传的附件个数,例如 `5`                                       |
+
+### 时间 (`time`)
+
+| 名称       | 描述                                                                                                                                                                                                                  |
+|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `FORMAT` | 指定日期的输出格式,默认为 RFC1123,其它可选的格式为 ANSIC、UnixDate、RubyDate、RFC822、RFC822Z、RFC850、RFC1123、RFC1123Z、RFC3339、RFC3339Nano、Kitchen、Stamp、StampMilli、StampMicro 和 StampNano。访问 http://golang.org/pkg/time/#pkg-constants 查看详情 |
+
+### 日志 (`log`)
+
+| 名称          | 描述                                                          |
+|-------------|-------------------------------------------------------------|
+| `ROOT_PATH` | 日志文件的根目录                                                    |
+| `MODE`      | 日志记录模式,默认为 `console`。如果想要开启多模式,请使用逗号分割,例如:`"console, file"` |
+| `LEVEL`     | 基本日志级别,默认为 `Trace`                                          |
+
+#### 日志 - 控制台 (`log.console`)
+
+| 名称      | 描述              |
+|---------|-----------------|
+| `LEVEL` | 控制台日志级别,留空则继承父值 |
+
+#### 日志 - 文件 (`log.file`)
+
+| 名称               | 描述                                            |
+|------------------|-----------------------------------------------|
+| `LEVEL`          | 文件日志级别,留空则继承父值                                |
+| `LOG_ROTATE`     | 激活该选项以启用日志文件自转                                |
+| `DAILY_ROTATE`   | 激活该选项以进行日常自转                                  |
+| `MAX_SIZE_SHIFT` | 自转需要达到的最大文件体积,使用位左移,默认为 28 即 1 << 28,表示 256MB |
+| `MAX_LINES`      | 自转需要达到的最大文件行数,默认为 `1000000`                   |
+| `MAX_DAYS`       | 保留自转文件的最长期限,默认为 `7` 天后删除                      |
+
+#### 日志 - Slack (`log.slack`)
+
+| 名称      | 描述                 |
+|---------|--------------------|
+| `LEVEL` | Slack 日志级别,留空则继承父值 |
+| `URL`   | Slack Web 钩子 URL   |
+
+#### 日志 - Discord (`log.discord`)
+
+| 名称         | 描述                   |
+|------------|----------------------|
+| `LEVEL`    | Discord 日志级别,留空则继承父值 |
+| `URL`      | Discord Web 钩子 URL   |
+| `USERNAME` | 在 Web 钩子中显示的用户名      |
+
+### Cron (`cron`)
+
+| 名称             | 描述                     |
+|----------------|------------------------|
+| `ENABLED`      | 激活该选项以允许周期性运行 Cron 任务  |
+| `RUN_AT_START` | 激活该选项以允许在启动时执行 Cron 任务 |
+
+#### Cron - 更新镜像 (`cron.update_mirrors`)
+
+| 名称         | 描述                               |
+|------------|----------------------------------|
+| `SCHEDULE` | 定时更新仓库镜像的 Cron 语法,例如:`@every 1h` |
+
+#### Cron - 仓库健康检查 (`cron.repo_health_check`)
+
+| 名称         | 描述                                         |
+|------------|--------------------------------------------|
+| `SCHEDULE` | 定时进行仓库健康检查的 Cron 语法,例如:`@every 24h`        |
+| `TIMEOUT`  | 仓库健康检查超时的定义语法,例如:`60s`                     |
+| `ARGS`     | `git fsck` 命令的参数,例如:`--unreachable --tags` |
+
+#### Cron - 仓库统计检查 (`cron.check_repo_stats`)
+
+| 名称             | 描述                                  |
+|----------------|-------------------------------------|
+| `RUN_AT_START` | 激活该选项以在启动时执行仓库统计检查                  |
+| `SCHEDULE`     | 定时进行仓库统计检查的 Cron 语法,例如:`@every 24h` |
+
+#### Cron - 仓库归档清理 (`cron.repo_archive_cleanup`)
+
+| 名称             | 描述                                  |
+|----------------|-------------------------------------|
+| `RUN_AT_START` | 激活该选项以在启动时执行仓库归档清理                  |
+| `SCHEDULE`     | 定时进行仓库归档清理的 Cron 语法,例如:`@every 24h` |
+| `OLDER_THAN`   | 仓库归档的文件有效期,过期的归档将被清理,例如:`24h`       |
+
+### Git (`git`)
+
+| 名称                             | 描述                                      |
+|--------------------------------|-----------------------------------------|
+| `DISABLE_DIFF_HIGHLIGHT`       | 激活该选项以禁用行内差异高亮                          |
+| `MAX_GIT_DIFF_LINES`           | 差异对比页面单个文件显示的最大行数                       |
+| `MAX_GIT_DIFF_LINE_CHARACTERS` | 差异对比页面单行显示的最大字符数                        |
+| `MAX_GIT_DIFF_FILES`           | 差异对比页面文件显示的最多个数                         |
+| `GC_ARGS`                      | `git gc` 命令的参数,例如:`--aggressive --auto` |
+
+#### Git - 超时 (`git.timeout`)
+
+| 名称        | 描述                     |
+|-----------|------------------------|
+| `MIGRATE` | 仓库迁移操作超时,默认为 `600` 秒   |
+| `MIRROR`  | 仓库镜像同步操作超时,默认为 `300` 秒 |
+| `CLONE`   | 仓库克隆操作超时,默认为 `300` 秒   |
+| `PULL`    | 仓库拉取操作超时,默认为 `300` 秒   |
+| `GC`      | 仓库垃圾回收操作超时,默认为 `60` 秒  |
+
+### UI (`ui`)
+
+| 名称                      | 描述                                                                                                                                                                  |
+|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `EXPLORE_PAGING_NUM`    | 探索页面每页显示仓库的数量                                                                                                                                                       |
+| `ISSUE_PAGING_NUM`      | 每页显示工单(Issue)的数量(应用到所有以列表形式显示工单的页面)                                                                                                                                 |
+| `FEED_MAX_COMMIT_NUM`   | 一条最新活动中显示代码提交(Commit)的最大数量                                                                                                                                          |
+| `THEME_COLOR_META_TAG`  | 被用于 Android >= 5.0 版本 "theme-color" 标记的值,无效的值将被忽略并使用默认值([查看详情](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android)) |
+| `MAX_DISPLAY_FILE_SIZE` | 显示到页面的最大文件体积(Byte)                                                                                                                                                  |
+
+#### UI - Admin (`ui.admin`)
+
+| 名称                  | 描述               |
+|---------------------|------------------|
+| `USER_PAGING_NUM`   | 用户管理页面每页显示记录条数   |
+| `REPO_PAGING_NUM`   | 仓库管理页面每页显示记录条数   |
+| `NOTICE_PAGING_NUM` | 系统提示管理页面每页显示记录条数 |
+| `ORG_PAGING_NUM`    | 组织管理页面每页显示记录条数   |
+
+#### Prometheus (`prometheus`)
+
+| 名称                    | 描述                                     |
+|-----------------------|----------------------------------------|
+| `ENABLED`             | 激活该选项以启用 Prometheus 监控信息,默认为 `true`    |
+| `ENABLE_BASIC_AUTH`   | 激活该选项以启用 HTTP 基本认证保护监控信息数据,默认为 `false` |
+| `BASIC_AUTH_USERNAME` | HTTP 基本认证的用户名                          |
+| `BASIC_AUTH_PASSWORD` | HTTP 基本认证的密码                           |

+ 0 - 131
docs/dev/database_schema.md

@@ -1,131 +0,0 @@
-# Table "access"
-
-```
-  FIELD  | COLUMN  |   POSTGRESQL    |         MYSQL         |     SQLITE3       
----------+---------+-----------------+-----------------------+-------------------
-  ID     | id      | BIGSERIAL       | BIGINT AUTO_INCREMENT | INTEGER           
-  UserID | user_id | BIGINT NOT NULL | BIGINT NOT NULL       | INTEGER NOT NULL  
-  RepoID | repo_id | BIGINT NOT NULL | BIGINT NOT NULL       | INTEGER NOT NULL  
-  Mode   | mode    | BIGINT NOT NULL | BIGINT NOT NULL       | INTEGER NOT NULL  
-
-Primary keys: id
-Indexes: 
-	"access_user_repo_unique" UNIQUE (user_id, repo_id)
-```
-
-# Table "access_token"
-
-```
-     FIELD    |    COLUMN    |         POSTGRESQL          |            MYSQL            |           SQLITE3            
---------------+--------------+-----------------------------+-----------------------------+------------------------------
-  ID          | id           | BIGSERIAL                   | BIGINT AUTO_INCREMENT       | INTEGER                      
-  UserID      | uid          | BIGINT                      | BIGINT                      | INTEGER                      
-  Name        | name         | TEXT                        | LONGTEXT                    | TEXT                         
-  Sha1        | sha1         | VARCHAR(40) UNIQUE          | VARCHAR(40) UNIQUE          | VARCHAR(40) UNIQUE           
-  SHA256      | sha256       | VARCHAR(64) NOT NULL UNIQUE | VARCHAR(64) NOT NULL UNIQUE | VARCHAR(64) NOT NULL UNIQUE  
-  CreatedUnix | created_unix | BIGINT                      | BIGINT                      | INTEGER                      
-  UpdatedUnix | updated_unix | BIGINT                      | BIGINT                      | INTEGER                      
-
-Primary keys: id
-Indexes: 
-	"idx_access_token_user_id" (uid)
-```
-
-# Table "action"
-
-```
-     FIELD     |     COLUMN     |           POSTGRESQL           |             MYSQL              |            SQLITE3              
----------------+----------------+--------------------------------+--------------------------------+---------------------------------
-  ID           | id             | BIGSERIAL                      | BIGINT AUTO_INCREMENT          | INTEGER                         
-  UserID       | user_id        | BIGINT                         | BIGINT                         | INTEGER                         
-  OpType       | op_type        | BIGINT                         | BIGINT                         | INTEGER                         
-  ActUserID    | act_user_id    | BIGINT                         | BIGINT                         | INTEGER                         
-  ActUserName  | act_user_name  | TEXT                           | LONGTEXT                       | TEXT                            
-  RepoID       | repo_id        | BIGINT                         | BIGINT                         | INTEGER                         
-  RepoUserName | repo_user_name | TEXT                           | LONGTEXT                       | TEXT                            
-  RepoName     | repo_name      | TEXT                           | LONGTEXT                       | TEXT                            
-  RefName      | ref_name       | TEXT                           | LONGTEXT                       | TEXT                            
-  IsPrivate    | is_private     | BOOLEAN NOT NULL DEFAULT FALSE | BOOLEAN NOT NULL DEFAULT FALSE | NUMERIC NOT NULL DEFAULT FALSE  
-  Content      | content        | TEXT                           | LONGTEXT                       | TEXT                            
-  CreatedUnix  | created_unix   | BIGINT                         | BIGINT                         | INTEGER                         
-
-Primary keys: id
-Indexes: 
-	"idx_action_repo_id" (repo_id)
-	"idx_action_user_id" (user_id)
-```
-
-# Table "email_address"
-
-```
-     FIELD    |    COLUMN    |           POSTGRESQL           |             MYSQL              |            SQLITE3              
---------------+--------------+--------------------------------+--------------------------------+---------------------------------
-  ID          | id           | BIGSERIAL                      | BIGINT AUTO_INCREMENT          | INTEGER                         
-  UserID      | uid          | BIGINT NOT NULL                | BIGINT NOT NULL                | INTEGER NOT NULL                
-  Email       | email        | VARCHAR(254) NOT NULL          | VARCHAR(254) NOT NULL          | TEXT NOT NULL                   
-  IsActivated | is_activated | BOOLEAN NOT NULL DEFAULT FALSE | BOOLEAN NOT NULL DEFAULT FALSE | NUMERIC NOT NULL DEFAULT FALSE  
-
-Primary keys: id
-Indexes: 
-	"email_address_user_email_unique" UNIQUE (uid, email)
-	"idx_email_address_user_id" (uid)
-```
-
-# Table "follow"
-
-```
-   FIELD   |  COLUMN   |   POSTGRESQL    |         MYSQL         |     SQLITE3       
------------+-----------+-----------------+-----------------------+-------------------
-  ID       | id        | BIGSERIAL       | BIGINT AUTO_INCREMENT | INTEGER           
-  UserID   | user_id   | BIGINT NOT NULL | BIGINT NOT NULL       | INTEGER NOT NULL  
-  FollowID | follow_id | BIGINT NOT NULL | BIGINT NOT NULL       | INTEGER NOT NULL  
-
-Primary keys: id
-Indexes: 
-	"follow_user_follow_unique" UNIQUE (user_id, follow_id)
-```
-
-# Table "lfs_object"
-
-```
-    FIELD   |   COLUMN   |      POSTGRESQL      |        MYSQL         |      SQLITE3       
-------------+------------+----------------------+----------------------+--------------------
-  RepoID    | repo_id    | BIGINT               | BIGINT               | INTEGER            
-  OID       | oid        | TEXT                 | VARCHAR(191)         | TEXT               
-  Size      | size       | BIGINT NOT NULL      | BIGINT NOT NULL      | INTEGER NOT NULL   
-  Storage   | storage    | TEXT NOT NULL        | LONGTEXT NOT NULL    | TEXT NOT NULL      
-  CreatedAt | created_at | TIMESTAMPTZ NOT NULL | DATETIME(3) NOT NULL | DATETIME NOT NULL  
-
-Primary keys: repo_id, oid
-```
-
-# Table "login_source"
-
-```
-     FIELD    |    COLUMN    |    POSTGRESQL    |         MYSQL         |     SQLITE3       
---------------+--------------+------------------+-----------------------+-------------------
-  ID          | id           | BIGSERIAL        | BIGINT AUTO_INCREMENT | INTEGER           
-  Type        | type         | BIGINT           | BIGINT                | INTEGER           
-  Name        | name         | TEXT UNIQUE      | VARCHAR(191) UNIQUE   | TEXT UNIQUE       
-  IsActived   | is_actived   | BOOLEAN NOT NULL | BOOLEAN NOT NULL      | NUMERIC NOT NULL  
-  IsDefault   | is_default   | BOOLEAN          | BOOLEAN               | NUMERIC           
-  Config      | cfg          | TEXT             | TEXT                  | TEXT              
-  CreatedUnix | created_unix | BIGINT           | BIGINT                | INTEGER           
-  UpdatedUnix | updated_unix | BIGINT           | BIGINT                | INTEGER           
-
-Primary keys: id
-```
-
-# Table "notice"
-
-```
-     FIELD    |    COLUMN    | POSTGRESQL |         MYSQL         | SQLITE3  
---------------+--------------+------------+-----------------------+----------
-  ID          | id           | BIGSERIAL  | BIGINT AUTO_INCREMENT | INTEGER  
-  Type        | type         | BIGINT     | BIGINT                | INTEGER  
-  Description | description  | TEXT       | TEXT                  | TEXT     
-  CreatedUnix | created_unix | BIGINT     | BIGINT                | INTEGER  
-
-Primary keys: id
-```
-

+ 0 - 17
docs/dev/import_locale.md

@@ -1,17 +0,0 @@
-# Import locales from Crowdin
-
-1. Upload the latest version of [`locale_en-US.ini`](https://github.com/gogs/gogs/blob/main/conf/locale/locale_en-US.ini) to the [Crowdin](https://crowdin.gogs.io/project/gogs/sources/files).
-1. [Build and download](https://crowdin.gogs.io/project/gogs/translations) the ZIP archive and unzip it.
-1. Go to root directory of the repository.
-1. Run the `import` subcommand:
-
-    ```
-    $ ./gogs import locale --source <path to the unzipped directory> --target ./conf/locale
-    Locale files has been successfully imported!
-    ```
-
-1. Run `task web` to start the web server, then visit the site in the browser to make sure nothing blows up.
-1. Check out a new branch using `git checkout -b update-locales`.
-1. Stage changes
-1. Run `git commit -m "locale: sync from Crowdin"`.
-1. Push the commit then open up a pull request on GitHub.

+ 0 - 174
docs/dev/local_development.md

@@ -1,174 +0,0 @@
-# Set up your development environment
-
-Gogs is written in [Go](https://golang.org/), please take [A Tour of Go](https://tour.golang.org/) if you haven't done so!
-
-## Outline
-
-- [Environment](#environment)
-- [Step 1: Install dependencies](#step-1-install-dependencies)
-- [Step 2: Initialize your database](#step-2-initialize-your-database)
-- [Step 3: Get the code](#step-3-get-the-code)
-- [Step 4: Configure database settings](#step-4-configure-database-settings)
-- [Step 5: Start the server](#step-5-start-the-server)
-- [Other nice things](#other-nice-things)
-
-## Environment
-
-Gogs is built and runs as a single binary and meant to be cross platform. Therefore, you should be able to develop Gogs in any major platforms you prefer.
-
-## Step 1: Install dependencies
-
-Gogs has the following dependencies:
-
-- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) (v1.8.3 or higher)
-- [Go](https://golang.org/doc/install) (v1.20 or higher)
-- [Less.js](http://lesscss.org/usage/#command-line-usage-installing)
-- [Task](https://github.com/go-task/task) (v3)
-- [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports)
-- [go-mockgen](https://github.com/derision-test/go-mockgen)
-- Database upon your choice (pick one, we choose PostgreSQL in this document):
-    - [PostgreSQL](https://wiki.postgresql.org/wiki/Detailed_installation_guides) (v9.6 or higher)
-    - [MySQL](https://dev.mysql.com/downloads/mysql/) with `ENGINE=InnoDB` (v5.7 or higher)
-    - [SQLite3](https://www.sqlite.org/index.html)
-    - [TiDB](https://github.com/pingcap/tidb)
-
-### macOS
-
-1. Install [Homebrew](https://brew.sh/).
-1. Install dependencies:
-
-    ```bash
-    brew install go postgresql git npm go-task/tap/go-task
-    npm install -g less
-    npm install -g less-plugin-clean-css
-    go install github.com/derision-test/go-mockgen/cmd/go-mockgen@v1.3.3
-    go install golang.org/x/tools/cmd/goimports@latest
-    ```
-
-1. Configure PostgreSQL to start automatically:
-
-    ```bash
-    brew services start postgresql
-    ```
-
-1.  Ensure `psql`, the PostgreSQL command line client, is on your `$PATH`.
-    Homebrew does not put it there by default. Homebrew gives you the command to run to insert `psql` in your path in the "Caveats" section of `brew info postgresql`. Alternatively, you can use the command below. It might need to be adjusted depending on your Homebrew prefix (`/usr/local` below) and shell (bash below).
-
-    ```bash
-    hash psql || { echo 'export PATH="/usr/local/opt/postgresql/bin:$PATH"' >> ~/.bash_profile }
-    source ~/.bash_profile
-    ```
-
-### Ubuntu
-
-1. Add package repositories:
-
-    ```bash
-    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
-    ```
-
-1. Update repositories:
-
-    ```bash
-    sudo apt-get update
-    ```
-
-1. Install dependencies:
-
-    ```bash
-    sudo apt install -y make git-all postgresql postgresql-contrib golang-go nodejs
-    npm install -g less
-    go install github.com/go-task/task/v3/cmd/task@latest
-    go install github.com/derision-test/go-mockgen/cmd/go-mockgen@v1.3.3
-    go install golang.org/x/tools/cmd/goimports@latest
-    ```
-
-1. Configure startup services:
-
-    ```bash
-    sudo systemctl enable postgresql
-    ```
-
-## Step 2: Initialize your database
-
-You need a fresh Postgres database and a database user that has full ownership of that database.
-
-1. Create a database for the current Unix user:
-
-    ```bash
-    # For Linux users, first access the postgres user shell
-    sudo su - postgres
-    ```
-
-    ```bash
-    createdb
-    ```
-
-2. Create the Gogs user and password:
-
-    ```bash
-    createuser --superuser gogs
-    psql -c "ALTER USER gogs WITH PASSWORD '<YOUR PASSWORD HERE>';"
-    ```
-
-3. Create the Gogs database
-
-    ```bash
-    createdb --owner=gogs --encoding=UTF8 --template=template0 gogs
-    ```
-
-## Step 3: Get the code
-
-Generally, you don't need a full clone, so set `--depth` to `10`:
-
-```bash
-git clone --depth 10 https://github.com/gogs/gogs.git
-```
-
-**NOTE** The repository has Go modules enabled, please clone to somewhere outside of your `$GOPATH`.
-
-## Step 4: Configure database settings
-
-Create a `custom/conf/app.ini` file inside the repository and put the following configuration (everything under `custom/` directory is used to override default files and is excluded by `.gitignore`):
-
-```ini
-[database]
-TYPE = postgres
-HOST = 127.0.0.1:5432
-NAME = gogs
-USER = gogs
-PASSWORD = <YOUR PASSWORD HERE>
-SSL_MODE = disable
-```
-
-## Step 5: Start the server
-
-The following command will start the web server and automatically recompile and restart the server if any Go files changed:
-
-```bash
-task web --watch
-```
-
-**NOTE** If you changed any file under `conf/`, `template/` or `public/` directory, be sure to run `task generate` afterwards!
-
-## Other nice things
-
-### Load HTML templates and static files from disk
-
-When you are actively working on HTML templates and static files during development, you may want to enable the following configuration to avoid recompiling and restarting Gogs every time you make a change to files under `template/` and `public/` directories:
-
-```ini
-RUN_MODE = dev
-
-[server]
-LOAD_ASSETS_FROM_DISK = true
-```
-
-### Offline development
-
-Sometimes you will want to develop Gogs but it just so happens you will be on a plane or a train or perhaps a beach, and you will have no WiFi. And you may raise your fist toward heaven and say something like, "Why, we can put a man on the moon, so why can't we develop high-quality Git hosting without an Internet connection?" But lower your hand back to your keyboard and fret no further, you *can* develop Gogs with no connectivity by setting the following configuration in your `custom/conf/app.ini`:
-
-```ini
-[server]
-OFFLINE_MODE = true
-```

+ 0 - 28
docs/user/lfs.md

@@ -1,28 +0,0 @@
-# Git Large File Storage (LFS)
-
-> This document is driven from https://docs.gitlab.com/ee/topics/git/lfs/.
-
-Managing large binaries in Git repositories is challenging, that is why Git LFS was developed for, to manage large files.
-
-## How it works
-
-Git LFS client talks with the Gogs server over HTTP/HTTPS. It uses HTTP Basic Authentication to authorize client requests. Once the request is authorized, Git LFS client receives instructions from where to fetch or where to push the large file.
-
-## Server configuration
-
-Please refer to [Configuring Git Large File Storage (LFS)](../admin/lfs.md).
-
-## Requirements
-
-- Git LFS is supported in Gogs starting with version 0.12.
-- [Git LFS client](https://git-lfs.github.com/) version 1.0.1 and up.
-
-## Known limitations
-
-- When SSH is set as a remote, Git LFS objects still go through HTTP/HTTPS.
-- Any Git LFS request will ask for HTTP/HTTPS credentials to be provided so a good Git credentials store is recommended.
-- File locking is not supported, and is being tracked in [#6064](https://github.com/gogs/gogs/issues/6064).
-
-## Using Git LFS
-
-Git LFS endpoints in a Gogs server can be automatically discovered by the Git LFS client, therefore you do not need to configure anything upfront for using it. Please walk through official [Git LFS Tutorial](https://github.com/git-lfs/git-lfs/wiki/Tutorial) to get started.

+ 0 - 2
internal/conf/conf.go

@@ -375,8 +375,6 @@ func Init(customConf string) error {
 		return errors.Wrap(err, "mapping [ui] section")
 	} else if err = File.Section("prometheus").MapTo(&Prometheus); err != nil {
 		return errors.Wrap(err, "mapping [prometheus] section")
-	} else if err = File.Section("other").MapTo(&Other); err != nil {
-		return errors.Wrap(err, "mapping [other] section")
 	}
 
 	HasRobotsTxt = osutil.IsFile(filepath.Join(CustomDir(), "robots.txt"))

+ 0 - 6
internal/conf/static.go

@@ -221,12 +221,6 @@ var (
 		BasicAuthPassword string
 	}
 
-	// Other settings
-	Other struct {
-		ShowFooterBranding         bool
-		ShowFooterTemplateLoadTime bool
-	}
-
 	// Global setting
 	HasRobotsTxt bool
 )

+ 0 - 1
internal/context/context.go

@@ -292,7 +292,6 @@ func Contexter(store Store) macaron.Handler {
 		log.Trace("CSRF Token: %v", c.Data["CSRFToken"])
 
 		c.Data["ShowRegistrationButton"] = !conf.Auth.DisableRegistration
-		c.Data["ShowFooterBranding"] = conf.Other.ShowFooterBranding
 
 		c.renderNoticeBanner()
 

+ 0 - 3
internal/template/template.go

@@ -67,9 +67,6 @@ func FuncMap() []template.FuncMap {
 			"DisableGravatar": func() bool {
 				return conf.Picture.DisableGravatar
 			},
-			"ShowFooterTemplateLoadTime": func() bool {
-				return conf.Other.ShowFooterTemplateLoadTime
-			},
 			"LoadTimes": func(startTime time.Time) string {
 				return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"
 			},

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 3
public/assets/font-awesome-4.6.3/css/font-awesome.min.css


BIN
public/assets/font-awesome-4.6.3/fonts/FontAwesome.otf


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.svg


BIN
public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf


BIN
public/assets/font-awesome-4.6.3/fonts/fontawesome-webfont.woff


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
public/css/gogs.min.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
public/css/gogs.min.css.map


+ 0 - 12
public/embed.go

@@ -1,12 +0,0 @@
-// Copyright 2022 The Gogs Authors. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE.gogs file.
-
-package public
-
-import (
-	"embed"
-)
-
-//go:embed assets/* css/* img/* js/* plugins/*
-var Files embed.FS

BIN
public/img/avatar_default.png


BIN
public/img/checkmark.png


BIN
public/img/dingtalk.png


BIN
public/img/emoji/+1.png


BIN
public/img/emoji/-1.png


BIN
public/img/emoji/100.png


BIN
public/img/emoji/1234.png


BIN
public/img/emoji/8ball.png


BIN
public/img/emoji/a.png


BIN
public/img/emoji/ab.png


BIN
public/img/emoji/abc.png


BIN
public/img/emoji/abcd.png


BIN
public/img/emoji/accept.png


BIN
public/img/emoji/aerial_tramway.png


BIN
public/img/emoji/airplane.png


BIN
public/img/emoji/alarm_clock.png


BIN
public/img/emoji/alien.png


BIN
public/img/emoji/ambulance.png


BIN
public/img/emoji/anchor.png


BIN
public/img/emoji/angel.png


BIN
public/img/emoji/anger.png


BIN
public/img/emoji/angry.png


BIN
public/img/emoji/anguished.png


BIN
public/img/emoji/ant.png


BIN
public/img/emoji/apple.png


BIN
public/img/emoji/aquarius.png


BIN
public/img/emoji/aries.png


BIN
public/img/emoji/arrow_backward.png


BIN
public/img/emoji/arrow_double_down.png


BIN
public/img/emoji/arrow_double_up.png


BIN
public/img/emoji/arrow_down.png


BIN
public/img/emoji/arrow_down_small.png


BIN
public/img/emoji/arrow_forward.png


BIN
public/img/emoji/arrow_heading_down.png


BIN
public/img/emoji/arrow_heading_up.png


BIN
public/img/emoji/arrow_left.png


BIN
public/img/emoji/arrow_lower_left.png


BIN
public/img/emoji/arrow_lower_right.png


BIN
public/img/emoji/arrow_right.png


BIN
public/img/emoji/arrow_right_hook.png


BIN
public/img/emoji/arrow_up.png


BIN
public/img/emoji/arrow_up_down.png


BIN
public/img/emoji/arrow_up_small.png


BIN
public/img/emoji/arrow_upper_left.png


BIN
public/img/emoji/arrow_upper_right.png


BIN
public/img/emoji/arrows_clockwise.png


BIN
public/img/emoji/arrows_counterclockwise.png


BIN
public/img/emoji/art.png


BIN
public/img/emoji/articulated_lorry.png


BIN
public/img/emoji/astonished.png


BIN
public/img/emoji/atm.png


BIN
public/img/emoji/b.png


BIN
public/img/emoji/baby.png


BIN
public/img/emoji/baby_bottle.png


BIN
public/img/emoji/baby_chick.png


BIN
public/img/emoji/baby_symbol.png


BIN
public/img/emoji/back.png


BIN
public/img/emoji/baggage_claim.png


BIN
public/img/emoji/balloon.png


BIN
public/img/emoji/ballot_box_with_check.png


BIN
public/img/emoji/bamboo.png


BIN
public/img/emoji/banana.png


BIN
public/img/emoji/bangbang.png


BIN
public/img/emoji/bank.png


BIN
public/img/emoji/bar_chart.png


BIN
public/img/emoji/barber.png


BIN
public/img/emoji/baseball.png


BIN
public/img/emoji/basketball.png


BIN
public/img/emoji/bath.png


BIN
public/img/emoji/bathtub.png


BIN
public/img/emoji/battery.png


BIN
public/img/emoji/bear.png


BIN
public/img/emoji/bee.png


BIN
public/img/emoji/beer.png


BIN
public/img/emoji/beers.png


BIN
public/img/emoji/beetle.png


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác