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