From 934a0693213df901078cd1bc75a5b7e1b5c87555 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 17 May 2024 23:01:17 +0200 Subject: feat: render markdown in packages' LongDescription --- frontend/static/style.css | 4 ++++ frontend/templates/blocks/packages.gotmpl | 6 +++++- internal/importer/package.go | 2 +- internal/nix/package.go | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/static/style.css b/frontend/static/style.css index c8d8cf6..ff4cc6e 100644 --- a/frontend/static/style.css +++ b/frontend/static/style.css @@ -125,3 +125,7 @@ h3 { font-size: 1.25rem; display: inline-block; } + +blockquote > p { + margin: unset; +} diff --git a/frontend/templates/blocks/packages.gotmpl b/frontend/templates/blocks/packages.gotmpl index b6e4584..90ba0b2 100644 --- a/frontend/templates/blocks/packages.gotmpl +++ b/frontend/templates/blocks/packages.gotmpl @@ -11,7 +11,11 @@ {{- end }} -
{{ or .LongDescription .Description }}
+ {{- if .LongDescription }} + {{ markdown .LongDescription }} + {{- else }} +{{ .Description }}
+ {{- end }}