aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/usage
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-07-28 03:22:47 +0200
committerGitHub <noreply@github.com>2022-07-28 09:22:47 +0800
commitae52df6a64477bcd5076ddddbee64bb22b3897a0 (patch)
tree2950725dedb126fdff5f65fdd66cd61329e8c806 /docs/content/doc/usage
parent6554d5197fa4082f3058ee880d2d6d80fbd97a56 (diff)
downloadgitea-ae52df6a64477bcd5076ddddbee64bb22b3897a0.tar.gz
gitea-ae52df6a64477bcd5076ddddbee64bb22b3897a0.zip
Add markdownlint (#20512)
Add `markdownlint` linter and fix issues. Config is based on the one from electron's repo with a few rules relaxed.
Diffstat (limited to 'docs/content/doc/usage')
-rw-r--r--docs/content/doc/usage/backup-and-restore.zh-tw.md1
-rw-r--r--docs/content/doc/usage/command-line.en-us.md4
-rw-r--r--docs/content/doc/usage/email-setup.en-us.md8
-rw-r--r--docs/content/doc/usage/fail2ban-setup.en-us.md6
-rw-r--r--docs/content/doc/usage/https-support.md2
-rw-r--r--docs/content/doc/usage/issue-pull-request-templates.zh-cn.md1
-rw-r--r--docs/content/doc/usage/permissions.en-us.md2
-rw-r--r--docs/content/doc/usage/push-options.en-us.md10
-rw-r--r--docs/content/doc/usage/push-options.zh-tw.md4
-rw-r--r--docs/content/doc/usage/reverse-proxies.en-us.md4
-rw-r--r--docs/content/doc/usage/reverse-proxies.zh-cn.md2
-rw-r--r--docs/content/doc/usage/template-repositories.md12
12 files changed, 37 insertions, 19 deletions
diff --git a/docs/content/doc/usage/backup-and-restore.zh-tw.md b/docs/content/doc/usage/backup-and-restore.zh-tw.md
index 152d0a19b7..18e244b19c 100644
--- a/docs/content/doc/usage/backup-and-restore.zh-tw.md
+++ b/docs/content/doc/usage/backup-and-restore.zh-tw.md
@@ -45,6 +45,7 @@ Gitea 目前支援 `dump` 指令,用來將資料備份成 zip 檔案,後續
持續更新中: 此文件尚未完成.
例:
+
```sh
unzip gitea-dump-1610949662.zip
cd gitea-dump-1610949662
diff --git a/docs/content/doc/usage/command-line.en-us.md b/docs/content/doc/usage/command-line.en-us.md
index 8cc420ed11..5f05bc4c3b 100644
--- a/docs/content/doc/usage/command-line.en-us.md
+++ b/docs/content/doc/usage/command-line.en-us.md
@@ -364,7 +364,7 @@ NB: Gitea must be running for this command to succeed.
### migrate
-Migrates the database. This command can be used to run other commands before starting the server for the first time.
+Migrates the database. This command can be used to run other commands before starting the server for the first time.
This command is idempotent.
### convert
@@ -522,7 +522,7 @@ Dump-repo dumps repository data from Git/GitHub/Gitea/GitLab:
- Options:
- `--git_service service` : Git service, it could be `git`, `github`, `gitea`, `gitlab`, If clone_addr could be recognized, this could be ignored.
- - `--repo_dir dir`, `-r dir`: Repository dir path to store the data
+ - `--repo_dir dir`, `-r dir`: Repository dir path to store the data
- `--clone_addr addr`: The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL. i.e. https://github.com/lunny/tango.git
- `--auth_username lunny`: The username to visit the clone_addr
- `--auth_password <password>`: The password to visit the clone_addr
diff --git a/docs/content/doc/usage/email-setup.en-us.md b/docs/content/doc/usage/email-setup.en-us.md
index df1b8545af..533e0fe1a8 100644
--- a/docs/content/doc/usage/email-setup.en-us.md
+++ b/docs/content/doc/usage/email-setup.en-us.md
@@ -60,9 +60,10 @@ To send a test email to validate the settings, go to Gitea > Site Administration
For the full list of options check the [Config Cheat Sheet]({{< relref "doc/advanced/config-cheat-sheet.en-us.md" >}})
Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
- - STARTTLS (also known as Opportunistic TLS) via port 587. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it.
- - SMTPS connection (SMTP over TLS) via the default port 465. Connection to the server use TLS from the beginning.
- - Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.)
+
+- STARTTLS (also known as Opportunistic TLS) via port 587. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it.
+- SMTPS connection (SMTP over TLS) via the default port 465. Connection to the server use TLS from the beginning.
+- Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.)
This is due to protections imposed by the Go internal libraries against STRIPTLS attacks.
Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/rfc8314#section-3) since 2018.
@@ -82,4 +83,3 @@ MAILER_TYPE = smtp
IS_TLS_ENABLED = true
HELO_HOSTNAME = example.com
```
-
diff --git a/docs/content/doc/usage/fail2ban-setup.en-us.md b/docs/content/doc/usage/fail2ban-setup.en-us.md
index d1ff633246..f00551e3ef 100644
--- a/docs/content/doc/usage/fail2ban-setup.en-us.md
+++ b/docs/content/doc/usage/fail2ban-setup.en-us.md
@@ -29,31 +29,37 @@ on a bad authentication from the web or CLI using SSH or HTTP respectively:
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:143:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:155:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:198:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:213:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:227:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.)
```log
2020/10/15 16:05:09 modules/ssh/ssh.go:249:sshConnectionFailed() [W] Failed authentication attempt from xxx.xxx.xxx.xxx
```
+
(From 1.15 this new message will available and doesn't have any of the false positive results that above messages from publicKeyHandler do. This will only be logged if the user has completely failed authentication.)
```log
diff --git a/docs/content/doc/usage/https-support.md b/docs/content/doc/usage/https-support.md
index 756e11fd03..783d6d8037 100644
--- a/docs/content/doc/usage/https-support.md
+++ b/docs/content/doc/usage/https-support.md
@@ -60,6 +60,7 @@ If you are using Docker, make sure that this port is configured in your `docker-
[ACME](https://tools.ietf.org/html/rfc8555) is a Certificate Authority standard protocol that allows you to automatically request and renew SSL/TLS certificates. [Let's Encrypt](https://letsencrypt.org/) is a free publicly trusted Certificate Authority server using this standard. Only `HTTP-01` and `TLS-ALPN-01` challenges are implemented. In order for ACME challenges to pass and verify your domain ownership, external traffic to the gitea domain on port `80` (`HTTP-01`) or port `443` (`TLS-ALPN-01`) has to be served by the gitea instance. Setting up [HTTP redirection](#setting-up-http-redirection) and port-forwards might be needed for external traffic to route correctly. Normal traffic to port `80` will otherwise be automatically redirected to HTTPS. **You must consent** to the ACME provider's terms of service (default Let's Encrypt's [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf)).
Minimum setup using the default Let's Encrypt:
+
```ini
[server]
PROTOCOL=https
@@ -72,6 +73,7 @@ ACME_EMAIL=email@example.com
```
Minimumg setup using a [smallstep CA](https://github.com/smallstep/certificates), refer to [their tutorial](https://smallstep.com/docs/tutorials/acme-challenge) for more information.
+
```ini
[server]
PROTOCOL=https
diff --git a/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md b/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md
index 1d2539b7bd..db69f3e5ce 100644
--- a/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md
+++ b/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md
@@ -26,7 +26,6 @@ menu:
* .github/ISSUE_TEMPLATE.md
* .github/issue_template.md
-
以下罗列了一些可供参考的 PR 模板:
* PULL_REQUEST_TEMPLATE.md
diff --git a/docs/content/doc/usage/permissions.en-us.md b/docs/content/doc/usage/permissions.en-us.md
index 0c3dc9e09e..013dbfabd4 100644
--- a/docs/content/doc/usage/permissions.en-us.md
+++ b/docs/content/doc/usage/permissions.en-us.md
@@ -55,7 +55,7 @@ And there are some differences for permissions between individual repositories a
## Individual Repository
-For individual repositories, the creators are the only owners of repositories and have no limit to change anything of this
+For individual repositories, the creators are the only owners of repositories and have no limit to change anything of this
repository or delete it. Repositories owners could add collaborators to help maintain the repositories. Collaborators could have `Read`, `Write` and `Admin` permissions.
## Organization Repository
diff --git a/docs/content/doc/usage/push-options.en-us.md b/docs/content/doc/usage/push-options.en-us.md
index 6539c9d7cd..8d7de19609 100644
--- a/docs/content/doc/usage/push-options.en-us.md
+++ b/docs/content/doc/usage/push-options.en-us.md
@@ -18,14 +18,16 @@ menu:
In Gitea `1.13`, support for some [push options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt)
were added.
-
## Supported Options
-- `repo.private` (true|false) - Change the repository's visibility.
-This is particularly useful when combined with push-to-create.
+- `repo.private` (true|false) - Change the repository's visibility.
+
+ This is particularly useful when combined with push-to-create.
+
- `repo.template` (true|false) - Change whether the repository is a template.
-Example of changing a repository's visibility to public:
+Example of changing a repository's visibility to public:
+
```shell
git push -o repo.private=false -u origin master
```
diff --git a/docs/content/doc/usage/push-options.zh-tw.md b/docs/content/doc/usage/push-options.zh-tw.md
index b0fc75ac24..d6ffbe695b 100644
--- a/docs/content/doc/usage/push-options.zh-tw.md
+++ b/docs/content/doc/usage/push-options.zh-tw.md
@@ -20,8 +20,10 @@ Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/g
## 支援的 Options
-- `repo.private` (true|false) - 修改儲存庫的可見性。
+- `repo.private` (true|false) - 修改儲存庫的可見性。
+
與 push-to-create 一起使用時特別有用。
+
- `repo.template` (true|false) - 修改儲存庫是否為範本儲存庫。
以下範例修改儲存庫的可見性為公開:
diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md
index 9e903f4259..5797d8e5eb 100644
--- a/docs/content/doc/usage/reverse-proxies.en-us.md
+++ b/docs/content/doc/usage/reverse-proxies.en-us.md
@@ -138,7 +138,6 @@ In your nginx config file containing your Gitea proxy directive, find the `locat
`client_max_body_size 16M;` to set this limit to 16 megabytes or any other number of choice.
If you use Git LFS, this will also limit the size of the largest file you will be able to push.
-
## Apache HTTPD
If you want Apache HTTPD to serve your Gitea instance, you can add the following to your Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
@@ -307,6 +306,7 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
If you want HAProxy to serve your Gitea instance, you can add the following to your HAProxy configuration
add an acl in the frontend section to redirect calls to gitea.example.com to the correct backend
+
```
frontend http-in
...
@@ -316,6 +316,7 @@ frontend http-in
```
add the previously defined backend section
+
```
backend gitea
server localhost:3000 check
@@ -338,6 +339,7 @@ frontend http-in
With that configuration http://example.com/gitea/ will redirect to your Gitea instance.
then for the backend section
+
```
backend gitea
http-request replace-path /gitea\/?(.*) \/\1
diff --git a/docs/content/doc/usage/reverse-proxies.zh-cn.md b/docs/content/doc/usage/reverse-proxies.zh-cn.md
index 88db0c3790..722b9c7c9d 100644
--- a/docs/content/doc/usage/reverse-proxies.zh-cn.md
+++ b/docs/content/doc/usage/reverse-proxies.zh-cn.md
@@ -121,4 +121,4 @@ gitea:
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
```
-这份配置假设您使用 traefik 来处理 HTTPS 服务,并在其和 Gitea 之间使用 HTTP 进行通信。 \ No newline at end of file
+这份配置假设您使用 traefik 来处理 HTTPS 服务,并在其和 Gitea 之间使用 HTTP 进行通信。
diff --git a/docs/content/doc/usage/template-repositories.md b/docs/content/doc/usage/template-repositories.md
index 24fdf28ee0..9a2a23ed2b 100644
--- a/docs/content/doc/usage/template-repositories.md
+++ b/docs/content/doc/usage/template-repositories.md
@@ -19,8 +19,10 @@ menu:
{{< toc >}}
-Gitea `1.11.0` and above includes template repositories, and one feature implemented with them is auto-expansion of specific variables within your template files.
-To tell Gitea which files to expand, you must include a `template` file inside the `.gitea` directory of the template repository.
+Gitea `1.11.0` and above includes template repositories, and one feature implemented with them is auto-expansion of specific variables within your template files.
+
+To tell Gitea which files to expand, you must include a `template` file inside the `.gitea` directory of the template repository.
+
Gitea uses [gobwas/glob](https://github.com/gobwas/glob) for its glob syntax. It closely resembles a traditional `.gitignore`, however there may be slight differences.
## Example `.gitea/template` file
@@ -45,7 +47,8 @@ a/b/c/d.json
## Variable Expansion
-In any file matched by the above globs, certain variables will be expanded.
+In any file matched by the above globs, certain variables will be expanded.
+
All variables must be of the form `$VAR` or `${VAR}`. To escape an expansion, use a double `$$`, such as `$$VAR` or `$${VAR}`
| Variable | Expands To | Transformable |
@@ -65,7 +68,8 @@ All variables must be of the form `$VAR` or `${VAR}`. To escape an expansion, us
## Transformers :robot:
-Gitea `1.12.0` adds a few transformers to some of the applicable variables above.
+Gitea `1.12.0` adds a few transformers to some of the applicable variables above.
+
For example, to get `REPO_NAME` in `PASCAL`-case, your template would use `${REPO_NAME_PASCAL}`
Feeding `go-sdk` to the available transformers yields...