{{if eq .PackageDescriptor.Package.Type "cargo"}}

{{ctx.Locale.Tr "packages.installation"}}

[registry]
default = "forgejo"

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} {{end}} {{if .PackageDescriptor.Metadata.Dependencies}}

{{ctx.Locale.Tr "packages.dependencies"}}

{{range .PackageDescriptor.Metadata.Dependencies}} {{end}}
{{ctx.Locale.Tr "packages.dependency.id"}} {{ctx.Locale.Tr "packages.dependency.version"}}
{{.Name}} {{.Req}}
{{end}} {{if .PackageDescriptor.Metadata.Keywords}}

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} {{end}}
{{end}} {{end}}