diff options
author | merlleu <r.langdorph@gmail.com> | 2023-10-01 15:43:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 13:43:15 +0000 |
commit | a112cf34d391cc04770021f9ffaa29e383cb9d51 (patch) | |
tree | 73a7247c2a0a0c1e19977949378c2ee879d85a13 /templates/package/content | |
parent | 50070550a8798dba2f1758d39923f0f4ef09acb5 (diff) | |
download | gitea-a112cf34d391cc04770021f9ffaa29e383cb9d51.tar.gz gitea-a112cf34d391cc04770021f9ffaa29e383cb9d51.zip |
Cargo package - Fix missing domain in cargo sparse url (#27370)
Hello, it seems that one my previous PR (adding the sparse index to the
cargo package content page), did not worked as expected: the
gitea-origin-url does not add the AppURL because of the `sparse+` prefix
in the url.
Currently the rendered page gives the following:
```toml
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+/api/packages/ownername/cargo/" # Sparse index
# index = "https://git.example.com/ownername/_cargo-index.git" # Git
[net]
git-fetch-with-cli = true
```
Diffstat (limited to 'templates/package/content')
-rw-r--r-- | templates/package/content/cargo.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/package/content/cargo.tmpl b/templates/package/content/cargo.tmpl index da9fc4ab39..4dd7c3f731 100644 --- a/templates/package/content/cargo.tmpl +++ b/templates/package/content/cargo.tmpl @@ -8,7 +8,7 @@ default = "gitea" [registries.gitea] -index = "<gitea-origin-url data-url="sparse+{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cargo/"></gitea-origin-url>" # Sparse index +index = "sparse+<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cargo/"></gitea-origin-url>" # Sparse index # index = "<gitea-origin-url data-url="{{AppSubUrl}}/{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"></gitea-origin-url>" # Git [net] |