Skip to content

Legacy pages with null description render empty listing snippet and meta description #518

Description

@oalders

64 legacy articles have "description": null in their front matter. On listing pages and in <head>, this renders as empty output rather than falling back to article text.

Symptoms

  • Listing snippet (layouts/_default/li.html:26): <p>{{ .Description | markdownify }}</p> renders <p></p>.
  • Meta description (layouts/partials/header.html:13): <meta name="description" content="{{.Description}}"/> renders content="".

A reader (or an answer engine) scanning a list page gets no summary text for these entries.

Suggested fix

Fall back to .Summary when .Description is empty, e.g.:

{{ with .Description }}{{ . | markdownify }}{{ else }}{{ .Summary }}{{ end }}

in both li.html and header.html. A content backfill of the 64 null descriptions would be more thorough but is separate from the template fix. Many of the affected files are single-bullet slide-deck fragments (content/legacy/_doc_FMTEYEWTK_style_slideNN.md).

Found via /code-review-intense-flow (GEO lens) on #509.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions