Add version to package details (#4433)

This commit is contained in:
Sean Holung 2020-04-17 11:39:19 -07:00 committed by GitHub
parent f081d98a39
commit 854a1d5758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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{

View file

@ -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 }}