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