2023-02-05 15:42:31 +05:30
|
|
|
{{if eq .PackageDescriptor.Package.Type "cargo"}}
|
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
|
|
|
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.cargo.registry" | Safe}}</label>
|
|
|
|
<div class="markup"><pre class="code-block"><code>[registry]
|
|
|
|
default = "gitea"
|
|
|
|
|
|
|
|
[registries.gitea]
|
2023-09-13 09:44:10 +05:30
|
|
|
index = "<gitea-origin-url data-url="sparse+{{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
|
2023-02-05 15:42:31 +05:30
|
|
|
|
|
|
|
[net]
|
|
|
|
git-fetch-with-cli = true</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.cargo.install"}}</label>
|
|
|
|
<div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-08-27 17:29:12 +05:30
|
|
|
<label>{{.locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/" | Safe}}</label>
|
2023-02-05 15:42:31 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
|
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
|
|
|
|
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
|
2023-02-24 12:06:07 +05:30
|
|
|
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}}
|
2023-02-05 15:42:31 +05:30
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Dependencies}}
|
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<table class="ui single line very basic table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th>
|
|
|
|
<th class="six wide">{{.locale.Tr "packages.dependency.version"}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .PackageDescriptor.Metadata.Dependencies}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.Name}}</td>
|
|
|
|
<td>{{.Req}}</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Keywords}}
|
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
{{range .PackageDescriptor.Metadata.Keywords}}
|
|
|
|
{{.}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|