Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629)

- **Installation**: includes how to install Gitea and related other
tools, also includes upgrade Gitea
- **Administration**: includes how to configure Gitea, customize Gitea
and manage Gitea instance out of Gitea admin UI
- **Usage**: includes how to use Gitea's functionalities. A sub
documentation is about packages, in future we could also include CI/CD
and others.
- **Development**: includes how to integrate with Gitea's API, how to
develop new features within Gitea
- **Contributing**: includes how to contribute code to Gitea
repositories.

After this is merged, I think we can have a sub-documentation of `Usage`
part named `Actions` to describe how to use Gitea actions

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
Lunny Xiao 2023-03-23 23:18:24 +08:00 committed by GitHub
parent df411819eb
commit e8433b7fe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
123 changed files with 261 additions and 346 deletions

View file

@ -1,7 +1,7 @@
---
date: "2022-11-20T00:00:00+00:00"
title: "Cargo Packages Repository"
slug: "packages/cargo"
slug: "usage/packages/cargo"
draft: false
toc: false
menu:
@ -73,7 +73,7 @@ token = "Bearer {token}"
| Parameter | Description |
| --------- | ----------- |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) |
| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) |
## Publish a package

View file

@ -1,7 +1,7 @@
---
date: "2023-01-20T00:00:00+00:00"
title: "Chef Packages Repository"
slug: "packages/chef"
slug: "usage/packages/chef"
draft: false
toc: false
menu:

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Composer Packages Repository"
slug: "packages/composer"
slug: "usage/packages/composer"
draft: false
toc: false
menu:
@ -60,7 +60,7 @@ curl --user your_username:your_password_or_token \
https://gitea.example.com/api/packages/testuser/composer?version=1.0.3
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
The server responds with the following HTTP Status codes.

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Conan Packages Repository"
slug: "packages/conan"
slug: "usage/packages/conan"
draft: false
toc: false
menu:
@ -37,7 +37,7 @@ conan user --remote {remote} --password {password} {username}
| -----------| ----------- |
| `remote` | The remote name. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
For example:

View file

@ -1,7 +1,7 @@
---
date: "2022-12-28T00:00:00+00:00"
title: "Conda Packages Repository"
slug: "packages/conda"
slug: "usage/packages/conda"
draft: false
toc: false
menu:

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Container Registry"
slug: "packages/container"
slug: "usage/packages/container"
draft: false
toc: false
menu:
@ -34,7 +34,7 @@ To push an image or if the image is in a private registry, you have to authentic
docker login gitea.example.com
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
## Image naming convention

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Generic Packages Repository"
slug: "packages/generic"
slug: "usage/packages/generic"
draft: false
toc: false
menu:
@ -22,7 +22,7 @@ Publish generic files, like release binaries or other output, for your user or o
## Authenticate to the package registry
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}).
## Publish a package
@ -48,7 +48,7 @@ curl --user your_username:your_password_or_token \
https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
```
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password.
If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password.
The server reponds with the following HTTP Status codes.

View file

@ -1,7 +1,7 @@
---
date: "2022-04-14T00:00:00+00:00"
title: "Helm Chart Registry"
slug: "packages/helm"
slug: "usage/packages/helm"
draft: false
toc: false
menu:
@ -42,7 +42,7 @@ helm cm-push ./{chart_file}.tgz {repo}
| Parameter | Description |
| ------------ | ----------- |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `repo` | The name for the repository. |
| `chart_file` | The Helm Chart archive. |
| `owner` | The owner of the package. |

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Maven Packages Repository"
slug: "packages/maven"
slug: "usage/packages/maven"
draft: false
toc: false
menu:
@ -70,7 +70,7 @@ Afterwards add the following sections to your project `pom.xml` file:
| Parameter | Description |
| -------------- | ----------- |
| `access_token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `access_token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). |
| `owner` | The owner of the package. |
### Gradle variant

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "npm Packages Repository"
slug: "packages/npm"
slug: "usage/packages/npm"
draft: false
toc: false
menu:
@ -41,7 +41,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
| ------------ | ----------- |
| `scope` | The scope of the packages. |
| `owner` | The owner of the package. |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). |
For example:

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "NuGet Packages Repository"
slug: "packages/nuget"
slug: "usage/packages/nuget"
draft: false
toc: false
menu:
@ -38,7 +38,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p
| ------------- | ----------- |
| `source_name` | The desired source name. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
For example:
@ -47,7 +47,7 @@ For example:
dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json
```
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}).
## Publish a package

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "Package Registry"
slug: "packages/overview"
slug: "usage/packages/overview"
draft: false
toc: false
menu:

View file

@ -1,7 +1,7 @@
---
date: "2022-07-31T00:00:00+00:00"
title: "Pub Packages Repository"
slug: "packages/pub"
slug: "usage/packages/pub"
draft: false
toc: false
menu:
@ -38,7 +38,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub
| ------------ | ----------- |
| `owner` | The owner of the package. |
You need to provide your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}).
You need to provide your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}).
## Publish a package

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "PyPI Packages Repository"
slug: "packages/pypi"
slug: "usage/packages/pypi"
draft: false
toc: false
menu:
@ -42,7 +42,7 @@ password = {password}
| ------------ | ----------- |
| `owner` | The owner of the package. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
## Publish a package

View file

@ -1,7 +1,7 @@
---
date: "2021-07-20T00:00:00+00:00"
title: "RubyGems Packages Repository"
slug: "packages/rubygems"
slug: "usage/packages/rubygems"
draft: false
toc: false
menu:
@ -36,7 +36,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token}
| Parameter | Description |
| ------------- | ----------- |
| `owner` | The owner of the package. |
| `token` | Your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). |
| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). |
For example:

View file

@ -1,7 +1,7 @@
---
date: "2022-11-01T00:00:00+00:00"
title: "Storage"
slug: "packages/storage"
slug: "usage/packages/storage"
draft: false
toc: false
menu:
@ -31,7 +31,7 @@ Whenever a package gets deleted only the references to the underlaying blobs are
The blobs get not removed at this moment, so they still require space on the filesystem.
When a new package gets uploaded the existing blobs may get referenced again.
These unreferenced blobs get deleted by a [clean up job]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}).
These unreferenced blobs get deleted by a [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}).
The config setting `OLDER_THAN` configures how long unreferenced blobs are kept before they get deleted.
## Cleanup Rules
@ -71,7 +71,7 @@ The patterns are case-insensitive which matches the behaviour of the package reg
### How the cleanup rules work
The cleanup rules are part of the [clean up job]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}) and run periodically.
The cleanup rules are part of the [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}) and run periodically.
The cleanup rule:

View file

@ -1,7 +1,7 @@
---
date: "2023-01-10T00:00:00+00:00"
title: "Swift Packages Repository"
slug: "packages/swift"
slug: "usage/packages/swift"
draft: false
toc: false
menu:
@ -36,7 +36,7 @@ swift package-registry set https://gitea.example.com/api/packages/{owner}/swift
| ------------ | ----------- |
| `owner` | The owner of the package. |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
The login is optional and only needed if the package registry is private.
@ -61,7 +61,7 @@ curl -X PUT --user {username}:{password} \
| Placeholder | Description |
| ----------- | ----------- |
| `username` | Your Gitea username. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. |
| `owner` | The owner of the package. |
| `scope` | The package scope. |
| `name` | The package name. |

View file

@ -1,7 +1,7 @@
---
date: "2022-08-23T00:00:00+00:00"
title: "Vagrant Packages Repository"
slug: "packages/vagrant"
slug: "usage/packages/vagrant"
draft: false
toc: false
menu:
@ -69,7 +69,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy
```
This will install the latest version of the package. To add a specific version, use the `--box-version` parameter.
If the registry is private you can pass your [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) in the `VAGRANT_CLOUD_TOKEN` environment variable.
If the registry is private you can pass your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) in the `VAGRANT_CLOUD_TOKEN` environment variable.
## Supported commands