Add version to package details (#4433)
This commit is contained in:
parent
f081d98a39
commit
854a1d5758
|
@ -179,6 +179,7 @@ type packageDetails struct {
|
|||
Repository string
|
||||
License string
|
||||
Notes string
|
||||
Version string
|
||||
}
|
||||
|
||||
type resourceDocArgs struct {
|
||||
|
@ -1420,6 +1421,7 @@ func (mod *modContext) genIndex() indexData {
|
|||
Repository: mod.pkg.Repository,
|
||||
License: mod.pkg.License,
|
||||
Notes: mod.pkg.Attribution,
|
||||
Version: mod.pkg.Version.String(),
|
||||
}
|
||||
|
||||
data := indexData{
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
{{ if ne .Notes "" -}}
|
||||
<dt>Notes</dt>
|
||||
<dd>{{ htmlSafe .Notes }}</dd>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ if ne .Version "" -}}
|
||||
<dt>Version</dt>
|
||||
<dd>{{ htmlSafe .Version }}</dd>
|
||||
{{- end }}
|
||||
</dl>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue