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