content,internal: add description and title to unit page
Adds title and description to the legacy and new layout
unit pages. MetaDescription is updated to be the synopsis
of the documentation page.
Trust: Jamal Carvalho
Run-TryBot: Jamal Carvalho
@@ -10,7 +10,6 @@ import (
"errors"
"fmt"
"net/http"
- "strconv"
"strings"
"time"
@@ -218,7 +217,7 @@ func (s *Server) serveUnitPage(ctx context.Context, w http.ResponseWriter, r *ht
page.Details = d
main, ok := d.(*MainDetails)
if ok {
- page.MetaDescription = metaDescription(strconv.Itoa(main.ImportedByCount))
+ page.MetaDescription = metaDescription(main.DocSynopsis)
}
s.servePage(ctx, w, tabSettings.TemplateName, page)
return nil
