katheryn-website/backlog/tasks/task-11 - Fix-blog-post-ren...

1.5 KiB

id title status assignee created_date updated_date labels dependencies priority
task-11 Fix blog post rendering issues Done
2026-02-05 15:29 2026-02-05 15:30
high

Description

Fix various rendering issues in blog posts imported from Squarespace:

  • WordPress [caption] shortcodes appearing as raw text
  • HTML entities like — not being decoded
  • Duplicate featured images appearing in blog post content

Acceptance Criteria

  • #1 [caption] shortcodes converted to proper HTML figure/figcaption elements
  • #2 HTML entities decoded in excerpts (em-dash, smart quotes, etc.)
  • #3 Featured images not duplicated in blog post content
  • #4 CSS styling added for figure captions

Implementation Notes

Completed 2026-02-05. Changes made to frontend/scripts/parse-squarespace-xml.js:

  • Added convertCaptionShortcodes() to transform [caption]...[/caption] into figure/figcaption HTML
  • Added decodeExcerptEntities() for HTML entity decoding in excerpts
  • Added removeLeadingImage() to prevent featured image duplication
  • Added CSS styling for .wp-caption figures in globals.css

Commits:

  • 204679b Fix blog excerpt rendering: remove shortcodes and decode HTML entities
  • 64da557 Convert WordPress [caption] shortcodes to proper HTML figures
  • da39ee7 Remove duplicate featured images from blog content