{{/* One title in the software catalog (content/software/.md). The header carries the facts from the front matter: where it's installed from, the package, the command, what it stands in for, and links to the project's website and source. The body is the page's Markdown, followed by the other titles in the same group. */}} {{ define "main" }} {{ $p := . }} {{ $source := .Params.source | default "pacman" }} {{ $pkg := .Params.package }} {{ $pkgUrl := "" }} {{ with $pkg }} {{ if eq $source "pacman" }}{{ $pkgUrl = printf "https://archlinux.org/packages/?name=%s" . }} {{ else if eq $source "AUR" }}{{ $pkgUrl = printf "https://aur.archlinux.org/packages/%s" . }} {{ else if eq $source "Flathub" }}{{ $pkgUrl = printf "https://flathub.org/apps/%s" . }} {{ end }} {{ end }}

Software · {{ with .Params.category }}{{ . }}{{ end }}

{{ .Title }}

{{ with .Params.tagline }}

{{ . | markdownify }}

{{ end }} {{ if or .Params.website .Params.code }}
{{ with .Params.website }}Website{{ end }} {{ with .Params.code }}Source code{{ end }}
{{ end }}
Installed from
{{ $source }}{{ with $pkg }} · {{ if $pkgUrl }}{{ . }}{{ else }}{{ . }}{{ end }}{{ end }}
{{ with .Params.command }}
Run it
{{ . }}
{{ end }} {{ with .Params.replaces }}
Use instead of
{{ range $i, $n := . }}{{ if $i }}, {{ end }}{{ $n }}{{ end }}
{{ end }} {{ with .Params.website }}
Website
{{ . | strings.TrimPrefix "https://" | strings.TrimPrefix "http://" | strings.TrimPrefix "www." | strings.TrimSuffix "/" }}
{{ end }} {{ with .Params.code }}
Source
{{ . | strings.TrimPrefix "https://" | strings.TrimSuffix "/" }}
{{ end }}
{{ .Content }} {{ with .Params.links }}

Further reading

{{ end }}
{{ $others := where (where site.RegularPages "Section" "software") "Params.category" .Params.category }}
{{ end }}