2023-02-05 11:12:31 +01:00
|
|
|
{{if eq .PackageDescriptor.Package.Type "cargo"}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
|
2023-02-05 11:12:31 +01:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.cargo.registry"}}</label>
|
2023-02-05 11:12:31 +01:00
|
|
|
<div class="markup"><pre class="code-block"><code>[registry]
|
|
|
|
default = "gitea"
|
|
|
|
|
|
|
|
[registries.gitea]
|
2023-10-01 15:43:15 +02:00
|
|
|
index = "sparse+<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cargo/"></gitea-origin-url>" # Sparse index
|
2023-09-13 06:14:10 +02:00
|
|
|
# index = "<gitea-origin-url data-url="{{AppSubUrl}}/{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"></gitea-origin-url>" # Git
|
2023-02-05 11:12:31 +01:00
|
|
|
|
|
|
|
[net]
|
|
|
|
git-fetch-with-cli = true</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 10:56:50 +02:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.cargo.install"}}</label>
|
2023-02-05 11:12:31 +01:00
|
|
|
<div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/"}}</label>
|
2023-02-05 11:12:31 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
|
2023-02-05 11:12:31 +01:00
|
|
|
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
|
2023-02-24 07:36:07 +01:00
|
|
|
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}}
|
2023-02-05 11:12:31 +01:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Dependencies}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
|
2023-02-05 11:12:31 +01:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<table class="ui single line very basic table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-09-25 10:56:50 +02:00
|
|
|
<th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
|
|
|
|
<th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
|
2023-02-05 11:12:31 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .PackageDescriptor.Metadata.Dependencies}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.Name}}</td>
|
|
|
|
<td>{{.Req}}</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Keywords}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
|
2023-02-05 11:12:31 +01:00
|
|
|
<div class="ui attached segment">
|
|
|
|
{{range .PackageDescriptor.Metadata.Keywords}}
|
|
|
|
{{.}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|