From c88deee1a62e0df4aed7fc83b7e4e5e1bfee41e0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 6 Jun 2024 22:49:46 +0800 Subject: [PATCH] Some small improvements --- docs/administration/email-setup.md | 6 +++--- docs/installation/database-preparation.md | 2 +- docs/installation/from-binary.md | 6 ++++-- docs/installation/windows-service.md | 12 ++++++------ docs/installation/with-docker.md | 6 ++++-- docusaurus.config.js | 2 +- .../current/administration/email-setup.md | 6 +++--- .../current/installation/windows-service.md | 4 ++-- .../version-1.19/administration/email-setup.md | 6 +++--- .../version-1.20/administration/email-setup.md | 6 +++--- .../version-1.21/administration/email-setup.md | 6 +++--- .../version-1.21/installation/windows-service.md | 4 ++-- .../version-1.22/administration/email-setup.md | 6 +++--- .../version-1.22/installation/windows-service.md | 12 ++++++------ .../version-1.19/administration/email-setup.md | 6 +++--- .../version-1.19/installation/windows-service.md | 10 +++++----- .../version-1.20/administration/email-setup.md | 6 +++--- .../version-1.20/installation/windows-service.md | 10 +++++----- .../version-1.21/administration/email-setup.md | 6 +++--- .../version-1.22/administration/email-setup.md | 6 +++--- .../version-1.22/installation/windows-service.md | 12 ++++++------ 21 files changed, 72 insertions(+), 68 deletions(-) diff --git a/docs/administration/email-setup.md b/docs/administration/email-setup.md index f9621e60..690d8041 100644 --- a/docs/administration/email-setup.md +++ b/docs/administration/email-setup.md @@ -27,7 +27,7 @@ Note: For use in the official Gitea Docker image, please configure with the SMTP Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/r The following configuration should work with GMail's SMTP server: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0 diff --git a/docs/installation/database-preparation.md b/docs/installation/database-preparation.md index e6abb8a6..6a9e334d 100644 --- a/docs/installation/database-preparation.md +++ b/docs/installation/database-preparation.md @@ -35,7 +35,7 @@ Note: All steps below requires that the database engine of your choice is instal 2. On database instance, login to database console as root: - ``` + ```sh mysql -u root -p ``` diff --git a/docs/installation/from-binary.md b/docs/installation/from-binary.md index 88f82be3..cf5d11c7 100644 --- a/docs/installation/from-binary.md +++ b/docs/installation/from-binary.md @@ -30,7 +30,9 @@ You can find the file matching your platform from the [downloads page](https://d **For Windows**, you will likely want `windows-4.0-amd64`. It's for all modern versions of Windows, but there is also a `386` platform available designed for older, 32-bit versions of Windows. -*Note: there is also a `gogit-windows` file available that was created to help with some [performance problems](https://github.com/go-gitea/gitea/pull/15482) reported by some Windows users on older systems/versions. You should consider using this file if you're experiencing performance issues, and let us know if it improves performance.* +:::info +There is also a `gogit-windows` file available that was created to help with some [performance problems](https://github.com/go-gitea/gitea/pull/15482) reported by some Windows users on older systems/versions. You should consider using this file if you're experiencing performance issues, and let us know if it improves performance. +::: **For macOS**, you should choose `darwin-arm64` if your hardware uses Apple Silicon, or `darwin-amd64` for Intel. @@ -40,7 +42,7 @@ You can find the file matching your platform from the [downloads page](https://d Copy the commands below and replace the URL within the one you wish to download. -```sh +```shell wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` diff --git a/docs/installation/windows-service.md b/docs/installation/windows-service.md index 6c7d3725..1fadc832 100644 --- a/docs/installation/windows-service.md +++ b/docs/installation/windows-service.md @@ -20,7 +20,7 @@ menu: The following changes are made in C:\gitea\custom\conf\app.ini: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -32,7 +32,7 @@ COMPUTERNAME is whatever the response is from `echo %COMPUTERNAME%` on the comma If you use SQLite3, change the `PATH` to include the full path: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` @@ -42,7 +42,7 @@ PATH = c:/gitea/data/gitea.db To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: -``` +```sh sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` @@ -57,7 +57,7 @@ that was configured). It was observed that on loaded systems during boot Gitea service may fail to start with timeout records in Windows Event Log. In that case change startup type to `Automatic-Delayed`. This can be done during service creation, or by running config command -``` +```sh sc.exe config gitea start= delayed-auto ``` @@ -65,7 +65,7 @@ sc.exe config gitea start= delayed-auto To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command: -``` +```sh sc.exe config gitea depend= mariadb ``` @@ -75,6 +75,6 @@ This will ensure that when the Windows machine restarts, the automatic starting To unregister Gitea as a Windows service, open a command prompt (cmd) as an Administrator and run: -``` +```sh sc.exe delete gitea ``` diff --git a/docs/installation/with-docker.md b/docs/installation/with-docker.md index a16d4a8d..4ddfa470 100644 --- a/docs/installation/with-docker.md +++ b/docs/installation/with-docker.md @@ -269,7 +269,9 @@ files; for named volumes, this is done through another container or by direct ac ## Upgrading -:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation: +:::warning +Make sure you have volumed data to somewhere outside Docker container +::: To upgrade your installation to the latest release: @@ -296,7 +298,7 @@ or in a `.env` file in the same directory as `docker-compose.yml`. The settings can be also set or overridden with the content of a file by defining an environment variable of the form: `GITEA__section_name__KEY_NAME__FILE` that points to a file. -```bash +```yaml ... services: server: diff --git a/docusaurus.config.js b/docusaurus.config.js index 8f9526f2..0b308fe7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -316,7 +316,7 @@ const config = { prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, - additionalLanguages: ['ini'], + additionalLanguages: ['ini','diff'], }, }), }; diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/email-setup.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/email-setup.md index 2e670be8..7d99a5ca 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/email-setup.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/administration/email-setup.md @@ -27,7 +27,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 注意:对于面向互联网的网站,请查阅您的 MTA 文档以了解通过TLS发送邮件的说明。同时设置 SPF、DMARC 和 DKIM DNS 记录,以使发送的邮件被各个电子邮件提供商接受为合法邮件。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 直接使用 SMTP 服务器作为中继。如果您不想在实例上设置 MTA,但在电子邮件提供商那里有一个帐户,这个选项非常有用。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ PASSWD = `password` 以下配置应该适用于 Gmail 的 SMTP 服务器: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; 对于 Gitea >= 1.18.0,删除此行 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/installation/windows-service.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/installation/windows-service.md index d5761d2c..cb214eaf 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/installation/windows-service.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/installation/windows-service.md @@ -19,7 +19,7 @@ menu: 在 C:\gitea\custom\conf\app.ini 中进行了以下更改: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -31,7 +31,7 @@ COMPUTERNAME 是从命令行中运行 `echo %COMPUTERNAME%` 后得到的响应 如果您使用 SQLite3,请将 `PATH` 更改为包含完整路径: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.19/administration/email-setup.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.19/administration/email-setup.md index f4fb76c1..877a37a2 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.19/administration/email-setup.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.19/administration/email-setup.md @@ -27,7 +27,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 注意:对于面向互联网的网站,请查阅您的 MTA 文档以了解通过TLS发送邮件的说明。同时设置 SPF、DMARC 和 DKIM DNS 记录,以使发送的邮件被各个电子邮件提供商接受为合法邮件。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 直接使用 SMTP 服务器作为中继。如果您不想在实例上设置 MTA,但在电子邮件提供商那里有一个帐户,这个选项非常有用。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -71,7 +71,7 @@ PASSWD = `password` 以下配置应该适用于 Gmail 的 SMTP 服务器: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; 对于 Gitea >= 1.18.0,删除此行 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.20/administration/email-setup.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.20/administration/email-setup.md index 519b1321..89a02514 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.20/administration/email-setup.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.20/administration/email-setup.md @@ -27,7 +27,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 注意:对于面向互联网的网站,请查阅您的 MTA 文档以了解通过TLS发送邮件的说明。同时设置 SPF、DMARC 和 DKIM DNS 记录,以使发送的邮件被各个电子邮件提供商接受为合法邮件。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 直接使用 SMTP 服务器作为中继。如果您不想在实例上设置 MTA,但在电子邮件提供商那里有一个帐户,这个选项非常有用。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ PASSWD = `password` 以下配置应该适用于 Gmail 的 SMTP 服务器: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; 对于 Gitea >= 1.18.0,删除此行 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/administration/email-setup.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/administration/email-setup.md index 2e670be8..7d99a5ca 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/administration/email-setup.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/administration/email-setup.md @@ -27,7 +27,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 注意:对于面向互联网的网站,请查阅您的 MTA 文档以了解通过TLS发送邮件的说明。同时设置 SPF、DMARC 和 DKIM DNS 记录,以使发送的邮件被各个电子邮件提供商接受为合法邮件。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 直接使用 SMTP 服务器作为中继。如果您不想在实例上设置 MTA,但在电子邮件提供商那里有一个帐户,这个选项非常有用。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ PASSWD = `password` 以下配置应该适用于 Gmail 的 SMTP 服务器: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; 对于 Gitea >= 1.18.0,删除此行 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/installation/windows-service.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/installation/windows-service.md index 985492b7..fc85d473 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/installation/windows-service.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.21/installation/windows-service.md @@ -19,7 +19,7 @@ menu: 在 C:\gitea\custom\conf\app.ini 中进行了以下更改: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -31,7 +31,7 @@ COMPUTERNAME 是从命令行中运行 `echo %COMPUTERNAME%` 后得到的响应 如果您使用 SQLite3,请将 `PATH` 更改为包含完整路径: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/administration/email-setup.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/administration/email-setup.md index 2e670be8..7d99a5ca 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/administration/email-setup.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/administration/email-setup.md @@ -27,7 +27,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 注意:对于面向互联网的网站,请查阅您的 MTA 文档以了解通过TLS发送邮件的说明。同时设置 SPF、DMARC 和 DKIM DNS 记录,以使发送的邮件被各个电子邮件提供商接受为合法邮件。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 直接使用 SMTP 服务器作为中继。如果您不想在实例上设置 MTA,但在电子邮件提供商那里有一个帐户,这个选项非常有用。 -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ PASSWD = `password` 以下配置应该适用于 Gmail 的 SMTP 服务器: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; 对于 Gitea >= 1.18.0,删除此行 diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/installation/windows-service.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/installation/windows-service.md index d5761d2c..512cca4a 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/installation/windows-service.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.22/installation/windows-service.md @@ -19,7 +19,7 @@ menu: 在 C:\gitea\custom\conf\app.ini 中进行了以下更改: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -31,7 +31,7 @@ COMPUTERNAME 是从命令行中运行 `echo %COMPUTERNAME%` 后得到的响应 如果您使用 SQLite3,请将 `PATH` 更改为包含完整路径: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` @@ -40,7 +40,7 @@ PATH = c:/gitea/data/gitea.db 要注册为Windows服务,首先以Administrator身份运行 `cmd`,然后执行以下命令: -``` +```sh sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` @@ -53,7 +53,7 @@ sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \" 据观察,在启动期间加载的系统上,Gitea 服务可能无法启动,并在 Windows 事件日志中记录超时。 在这种情况下,将启动类型更改为`Automatic-Delayed`。这可以在服务创建期间完成,或者通过运行配置命令来完成。 -``` +```sh sc.exe config gitea start= delayed-auto ``` @@ -61,7 +61,7 @@ sc.exe config gitea start= delayed-auto 要将启动依赖项添加到 Gitea Windows 服务(例如 Mysql、Mariadb),作为管理员,然后运行以下命令: -``` +```sh sc.exe config gitea depend= mariadb ``` @@ -71,6 +71,6 @@ sc.exe config gitea depend= mariadb 以Administrator身份运行 `cmd`,然后执行以下命令: -``` +```sh sc.exe delete gitea ``` diff --git a/versioned_docs/version-1.19/administration/email-setup.md b/versioned_docs/version-1.19/administration/email-setup.md index f1fba19b..2bcbe152 100644 --- a/versioned_docs/version-1.19/administration/email-setup.md +++ b/versioned_docs/version-1.19/administration/email-setup.md @@ -25,7 +25,7 @@ Note: For use in the official Gitea Docker image, please configure with the SMTP Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -38,7 +38,7 @@ SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -69,7 +69,7 @@ Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/r The following configuration should work with GMail's SMTP server: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0 diff --git a/versioned_docs/version-1.19/installation/windows-service.md b/versioned_docs/version-1.19/installation/windows-service.md index d486e6e9..7fbac4a7 100644 --- a/versioned_docs/version-1.19/installation/windows-service.md +++ b/versioned_docs/version-1.19/installation/windows-service.md @@ -17,7 +17,7 @@ menu: The following changes are made in C:\gitea\custom\conf\app.ini: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -29,7 +29,7 @@ COMPUTERNAME is whatever the response is from `echo %COMPUTERNAME%` on the comma If you use SQLite3, change the `PATH` to include the full path: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` @@ -39,7 +39,7 @@ PATH = c:/gitea/data/gitea.db To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: -``` +```sh sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` @@ -53,7 +53,7 @@ that was configured). To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command: -``` +```sh sc.exe config gitea depend= mariadb ``` @@ -63,6 +63,6 @@ This will ensure that when the Windows machine restarts, the automatic starting To unregister Gitea as a service, open a command prompt (cmd) as an Administrator and run: -``` +```sh sc.exe delete gitea ``` diff --git a/versioned_docs/version-1.20/administration/email-setup.md b/versioned_docs/version-1.20/administration/email-setup.md index 5bb417fe..c4b24e7d 100644 --- a/versioned_docs/version-1.20/administration/email-setup.md +++ b/versioned_docs/version-1.20/administration/email-setup.md @@ -27,7 +27,7 @@ Note: For use in the official Gitea Docker image, please configure with the SMTP Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/r The following configuration should work with GMail's SMTP server: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0 diff --git a/versioned_docs/version-1.20/installation/windows-service.md b/versioned_docs/version-1.20/installation/windows-service.md index 201681bc..5b37b465 100644 --- a/versioned_docs/version-1.20/installation/windows-service.md +++ b/versioned_docs/version-1.20/installation/windows-service.md @@ -19,7 +19,7 @@ menu: The following changes are made in C:\gitea\custom\conf\app.ini: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -31,7 +31,7 @@ COMPUTERNAME is whatever the response is from `echo %COMPUTERNAME%` on the comma If you use SQLite3, change the `PATH` to include the full path: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` @@ -41,7 +41,7 @@ PATH = c:/gitea/data/gitea.db To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: -``` +```sh sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` @@ -55,7 +55,7 @@ that was configured). To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command: -``` +```sh sc.exe config gitea depend= mariadb ``` @@ -65,6 +65,6 @@ This will ensure that when the Windows machine restarts, the automatic starting To unregister Gitea as a service, open a command prompt (cmd) as an Administrator and run: -``` +```sh sc.exe delete gitea ``` diff --git a/versioned_docs/version-1.21/administration/email-setup.md b/versioned_docs/version-1.21/administration/email-setup.md index f9621e60..690d8041 100644 --- a/versioned_docs/version-1.21/administration/email-setup.md +++ b/versioned_docs/version-1.21/administration/email-setup.md @@ -27,7 +27,7 @@ Note: For use in the official Gitea Docker image, please configure with the SMTP Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/r The following configuration should work with GMail's SMTP server: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0 diff --git a/versioned_docs/version-1.22/administration/email-setup.md b/versioned_docs/version-1.22/administration/email-setup.md index f9621e60..690d8041 100644 --- a/versioned_docs/version-1.22/administration/email-setup.md +++ b/versioned_docs/version-1.22/administration/email-setup.md @@ -27,7 +27,7 @@ Note: For use in the official Gitea Docker image, please configure with the SMTP Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -40,7 +40,7 @@ SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. -```ini +```ini title="app.ini" [mailer] ENABLED = true FROM = gitea@mydomain.com @@ -70,7 +70,7 @@ Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/r The following configuration should work with GMail's SMTP server: -```ini +```ini title="app.ini" [mailer] ENABLED = true HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0 diff --git a/versioned_docs/version-1.22/installation/windows-service.md b/versioned_docs/version-1.22/installation/windows-service.md index 6c7d3725..1fadc832 100644 --- a/versioned_docs/version-1.22/installation/windows-service.md +++ b/versioned_docs/version-1.22/installation/windows-service.md @@ -20,7 +20,7 @@ menu: The following changes are made in C:\gitea\custom\conf\app.ini: -``` +```ini title="app.ini" RUN_USER = COMPUTERNAME$ ``` @@ -32,7 +32,7 @@ COMPUTERNAME is whatever the response is from `echo %COMPUTERNAME%` on the comma If you use SQLite3, change the `PATH` to include the full path: -``` +```ini title="app.ini" [database] PATH = c:/gitea/data/gitea.db ``` @@ -42,7 +42,7 @@ PATH = c:/gitea/data/gitea.db To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: -``` +```sh sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` @@ -57,7 +57,7 @@ that was configured). It was observed that on loaded systems during boot Gitea service may fail to start with timeout records in Windows Event Log. In that case change startup type to `Automatic-Delayed`. This can be done during service creation, or by running config command -``` +```sh sc.exe config gitea start= delayed-auto ``` @@ -65,7 +65,7 @@ sc.exe config gitea start= delayed-auto To add a startup dependency to the Gitea Windows service (eg Mysql, Mariadb), as an Administrator, then run the following command: -``` +```sh sc.exe config gitea depend= mariadb ``` @@ -75,6 +75,6 @@ This will ensure that when the Windows machine restarts, the automatic starting To unregister Gitea as a Windows service, open a command prompt (cmd) as an Administrator and run: -``` +```sh sc.exe delete gitea ```