TASK ARCHIVE: Tag Descriptions on Archive Pages#

SUMMARY#

Added optional per-tag descriptions seeded in _data/tags.yaml, rendered as body blurbs on tag archive pages (blog and garden) and injected as plain-text SEO metadata via a Jekyll :pages, :pre_render hook. Descriptions support Markdown and inline HTML in the body, with plain-text extraction for SEO meta tags.

REQUIREMENTS#

  1. Data file: _data/tags.yaml — flat mapping of tag slug to description string (YAML block scalar). Descriptions may contain HTML and/or Markdown.
  2. Layout change: _layouts/tag-archive.html and _layouts/garden-tag-archive.html — if a description exists for the current tag, render it between the heading and the post/note list.
  3. Conditional: Tags without an entry (or with an empty entry) should render unchanged — no visible change.
  4. Rendering: Descriptions processed through Kramdown (| markdownify) so both Markdown and inline HTML are supported in the body.
  5. SEO metadata (rework): Tag descriptions must also appear in <meta name="description">, og:description, and JSON-LD description via jekyll-seo-tag.

IMPLEMENTATION#

Files created/modified:

Key implementation detail: Jekyll::Archives::Archive objects store the tag name via a title method, not in page.data['title']. The hook must use page.title for the lookup.

TESTING#

Original build verification:

Rework verification:

QA: Both passes found no issues. Code follows KISS, DRY (acceptable duplication), YAGNI principles.

LESSONS LEARNED#

Technical:

Process:

PROCESS IMPROVEMENTS#

None — clean execution with one debugging iteration during rework build to discover the Archive class data model difference.

TECHNICAL IMPROVEMENTS#

If tag descriptions had been a foundational assumption, the ideal design would be the same — _data/tags.yaml as the single source, with a pre-render hook injecting into page.data['description'] for SEO and Liquid markdownify for the body. The only improvement would be to extract the tag lookup into a shared utility if more consumers emerge (e.g., a tags index page showing descriptions). For now, two independent access paths (Liquid and Ruby) is the right level of coupling.

NEXT STEPS#

None.