Move usage directories (#300)

Reviewed-on: https://gitea.com/gitea/docs/pulls/300
This commit is contained in:
Lunny Xiao committed 2025-11-20 19:49:24 +00:00
1 parent 00a36086b0
commit 9baa98ec3f
302 files changed
+24392 -880

No files matched your search

@@ -0,0 +1,9 @@
{
"label": "Access Control",
"position": 100,
"link": {
"type": "generated-index",
"slug": "/usage/access-control",
"description": "Permissions, security, and access control features"
}
}
@@ -3,7 +3,7 @@ date: "2024-01-31T00:00:00+00:00"
slug: "blocking-user" slug: "blocking-user"
sidebar_position: 25 sidebar_position: 25
aliases: aliases:
- /en-us/webhooks - /blocking-user
--- ---
# Blocking a user # Blocking a user
@@ -4,6 +4,7 @@ slug: "permissions"
sidebar_position: 14 sidebar_position: 14
aliases: aliases:
- /en-us/permissions - /en-us/permissions
- /permissions
--- ---
# Permissions # Permissions
@@ -5,6 +5,7 @@ sidebar_position: 44
aliases: aliases:
- /en-us/protected-branches - /en-us/protected-branches
- /en-us/protected-branch - /en-us/protected-branch
- /protected-branches
--- ---
# Protected branches # Protected branches
@@ -4,6 +4,7 @@ slug: "protected-tags"
sidebar_position: 45 sidebar_position: 45
aliases: aliases:
- /en-us/protected-tags - /en-us/protected-tags
- /protected-tags
--- ---
# Protected tags # Protected tags
+9
View File
@@ -0,0 +1,9 @@
{
"label": "Actions",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/usage/actions",
"description": "Automating workflows with Actions"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"label": "Issues & Pull Requests",
"position": 20,
"link": {
"type": "generated-index",
"slug": "/usage/issues-prs",
"description": "Issues and Pull Requests workflow, templates, and collaboration features"
}
}
@@ -5,6 +5,7 @@ sidebar_position: 12
aliases: aliases:
- /en-us/agit-setup - /en-us/agit-setup
- /agit-setup - /agit-setup
- /agit
--- ---
# AGit # AGit
File renamed without changes.
File renamed without changes.
File renamed without changes.
+9
View File
@@ -0,0 +1,9 @@
{
"label": "Packages",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/usage/packages",
"description": "Managing packages and package registries"
}
}
-16
View File
@@ -1,16 +0,0 @@
---
date: "2023-03-02T21:00:00+05:00"
slug: "profile-readme"
sidebar_position: 12
---
# Profile READMEs
To display a Markdown file in your Gitea user or organization profile page, create a repository named `.profile` and add a new file named `README.md` to it.
Gitea will automatically display the contents of the file on your profile, in a new "Overview" above your repositories.
Making the `.profile` repository private will hide the Profile README.
Example of user with `.profile/README.md`:
![profile readme screenshot](/images/usage/profile-readme.png)
+9
View File
@@ -0,0 +1,9 @@
{
"label": "Repository",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/usage/repository",
"description": "Repository management, Git operations, and content features"
}
}
@@ -4,6 +4,7 @@ slug: "blame"
sidebar_position: 13 sidebar_position: 13
aliases: aliases:
- /en-us/blame - /en-us/blame
- /blame
--- ---
# Blame File View # Blame File View
@@ -4,6 +4,7 @@ slug: "clone-filters"
sidebar_position: 25 sidebar_position: 25
aliases: aliases:
- /en-us/clone-filters - /en-us/clone-filters
- /clone-filters
--- ---
# Clone filters (partial clone) # Clone filters (partial clone)
@@ -4,6 +4,7 @@ slug: "code-owners"
sidebar_position: 30 sidebar_position: 30
aliases: aliases:
- /en-us/code-owners - /en-us/code-owners
- /code-owners
--- ---
# Code Owners # Code Owners
@@ -1,9 +1,10 @@
--- ---
date: "2022-12-01T00:00:00+00:00" date: "2022-12-01T00:00:00+00:00"
slug: "incoming-email" slug: "incoming-email"
sidebar_position: 13 sidebar_position: 130
aliases: aliases:
- /en-us/incoming-email - /en-us/incoming-email
- /incoming-email
--- ---
# Incoming Email # Incoming Email
@@ -1,6 +1,9 @@
--- ---
date: "2025-04-05T00:00:00+08:00" date: "2025-04-05T00:00:00+08:00"
slug: "markdown" slug: "markdown"
aliases:
- /markdown
sidebar_position: 4
--- ---
# Markdown # Markdown
@@ -1,7 +1,9 @@
--- ---
date: "2024-09-11T09:30:00+08:00" date: "2024-09-11T09:30:00+08:00"
slug: "migration" slug: "migration"
sidebar_position: 45 sidebar_position: 40
aliases:
- /migration
--- ---
# Migration # Migration
@@ -1,7 +1,9 @@
--- ---
date: "2023-03-02T21:00:00+05:00" date: "2023-03-02T21:00:00+05:00"
slug: "profile-readme" slug: "profile-readme"
sidebar_position: 12 sidebar_position: 42
aliases:
- /profile-readme
--- ---
# Profile READMEs # Profile READMEs
@@ -5,6 +5,7 @@ sidebar_position: 15
aliases: aliases:
- /en-us/push-to-create - /en-us/push-to-create
- /en-us/push-options - /en-us/push-options
- /push
--- ---
# Push # Push
@@ -44,7 +45,7 @@ Push to create is a feature that allows you to push to a repository that does no
### Enabling Push To Create ### Enabling Push To Create
In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](../administration/config-cheat-sheet.md#repository-repository). In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#repository-repository).
### Using Push To Create ### Using Push To Create
@@ -4,9 +4,10 @@ slug: "repo-mirror"
sidebar_position: 45 sidebar_position: 45
aliases: aliases:
- /en-us/repo-mirror - /en-us/repo-mirror
- /repo-mirror
--- ---
# Repository Mirror # Mirror Repository
Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories. Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories.
@@ -1,12 +1,13 @@
--- ---
date: "2019-11-28:00:00+02:00" date: "2019-11-28:00:00+02:00"
slug: "template-repositories" slug: "template-repositories"
sidebar_position: 14 sidebar_position: 44
aliases: aliases:
- /en-us/template-repositories - /en-us/template-repositories
- /template-repositories
--- ---
# Template Repositories # Template Repository
Since Gitea `1.11`, you can create template repositories. Since Gitea `1.11`, you can create template repositories.
When creating a repo based on a template, you can copy most of its content, and even auto-inject variables into it. When creating a repo based on a template, you can copy most of its content, and even auto-inject variables into it.
@@ -4,6 +4,7 @@ slug: "webhooks"
sidebar_position: 30 sidebar_position: 30
aliases: aliases:
- /en-us/webhooks - /en-us/webhooks
- /webhooks
--- ---
# Webhooks # Webhooks
-86
View File
@@ -1,86 +0,0 @@
---
date: "2019-11-28:00:00+02:00"
slug: "template-repositories"
sidebar_position: 14
aliases:
- /en-us/template-repositories
---
# Template Repositories
Since Gitea `1.11`, you can create template repositories.
When creating a repo based on a template, you can copy most of its content, and even auto-inject variables into it.
By default, variables will not be expanded in any file.
Only files contained in a pattern inside the `.gitea/template` file will be checked for if they contain variables.
When creating the template, all files are included except for this `.gitea/template` file.
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
All paths are relative to the base of the repository
```gitignore
# Expand all .go files, anywhere in the repository
**.go
# All text files in the text directory
text/*.txt
# A specific file
a/b/c/d.json
# Batch files in both upper or lower case can be matched
**.[bB][aA][tT]
```
## Variable Expansion
In any file matched by the above globs, the variables below will be expanded.
Matching filenames and paths can also be expanded, and are conservatively sanitized to support cross-platform filesystems.
You can use variables by prefixing them with `$` or surrounding them with `${}`, so both `$VAR` and `${VAR}` insert the value of `VAR` at this location.
To escape an expansion, use `$$`, such as `$$VAR` or `$${VAR}`.
These are the variables Gitea currently recognizes:
| Variable | Expands To | Transformable |
| -------------------- | --------------------------------------------------- | ------------- |
| YEAR | The year of generating the repository (i.e. `2024`) | ✘ |
| MONTH | The month of generating the repository (i.e. `03`) | ✘ |
| MONTH_ENGLISH | The month but in English (i.e. `March`) | ✓ |
| DAY | The day of generating the repository (i.e. `02`) | ✘ |
| REPO_NAME | The name of the generated repository | ✓ |
| TEMPLATE_NAME | The name of the template repository | ✓ |
| REPO_DESCRIPTION | The description of the generated repository | ✘ |
| TEMPLATE_DESCRIPTION | The description of the template repository | ✘ |
| REPO_OWNER | The owner of the generated repository | ✓ |
| TEMPLATE_OWNER | The owner of the template repository | ✓ |
| REPO_LINK | The URL to the generated repository | ✘ |
| TEMPLATE_LINK | The URL to the template repository | ✘ |
| REPO_HTTPS_URL | The HTTP(S) clone link for the generated repository | ✘ |
| TEMPLATE_HTTPS_URL | The HTTP(S) clone link for the template repository | ✘ |
| REPO_SSH_URL | The SSH clone link for the generated repository | ✘ |
| TEMPLATE_SSH_URL | The SSH clone link for the template repository | ✘ |
## Transformers :robot:
Since Gitea `1.12.0`, variables marked as transformable in the table above also have alternative versions where the given transformer has been applied.
Transformed variables can be called by appending the transformer name to the variable name.
For example, to get `REPO_NAME` in `PASCAL`-case, you should use the variable `${REPO_NAME_PASCAL}`.
The following transformers are available (assuming `go-sdk` is the input):
| Transformer | Effect |
| ----------- | ------ |
| SNAKE | go_sdk |
| KEBAB | go-sdk |
| CAMEL | goSdk |
| PASCAL | GoSdk |
| LOWER | go-sdk |
| UPPER | GO-SDK |
| TITLE | Go-Sdk |
+9
View File
@@ -0,0 +1,9 @@
{
"label": "User Setting",
"position": 200,
"link": {
"type": "generated-index",
"slug": "/usage/user-setting",
"description": "Configuring user preferences and settings"
}
}
@@ -2,6 +2,8 @@
date: "2023-08-22T14:21:00+08:00" date: "2023-08-22T14:21:00+08:00"
slug: "multi-factor-authentication" slug: "multi-factor-authentication"
weight: 15 weight: 15
aliases:
- /multi-factor-authentication
--- ---
# Multi-factor Authentication (MFA) # Multi-factor Authentication (MFA)
@@ -0,0 +1,9 @@
{
"label": "Access Control",
"position": 100,
"link": {
"type": "generated-index",
"slug": "/usage/access-control",
"description": "Permissions, security, and access control features"
}
}
@@ -0,0 +1,9 @@
{
"label": "Issues & Pull Requests",
"position": 20,
"link": {
"type": "generated-index",
"slug": "/usage/issues-prs",
"description": "Issues and Pull Requests workflow, templates, and collaboration features"
}
}
@@ -0,0 +1,9 @@
{
"label": "Repository",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/usage/repository",
"description": "Repository management, Git operations, and content features"
}
}
@@ -0,0 +1,9 @@
{
"label": "User Setting",
"position": 200,
"link": {
"type": "generated-index",
"slug": "/usage/user-setting",
"description": "Configuring user preferences and settings"
}
}
@@ -0,0 +1,29 @@
{
"sidebar.docs.category.Installation": {
"message": "安装"
},
"sidebar.docs.category.Administration": {
"message": "管理"
},
"sidebar.docs.category.Usage": {
"message": "使用"
},
"sidebar.docs.category.actions": {
"message": "工作流"
},
"sidebar.docs.category.packages": {
"message": "软件包"
},
"sidebar.docs.category.Development": {
"message": "开发"
},
"sidebar.docs.category.Contributing": {
"message": "贡献"
},
"sidebar.docs.category.Help": {
"message": "帮助"
},
"sidebar.docs.doc.What is Gitea?": {
"message": "Gitea是什么?"
}
}
@@ -0,0 +1,9 @@
{
"label": "运维",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/administration",
"title": "运维"
}
}
Loaded 50 of 302 files, more files were not shown because too many files have changed in this diff. Show more