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

44 lines
1.5 KiB
Markdown

---
id: task-11
title: Fix blog post rendering issues
status: Done
assignee: []
created_date: '2026-02-05 15:29'
updated_date: '2026-02-05 15:30'
labels: []
dependencies: []
priority: high
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Fix various rendering issues in blog posts imported from Squarespace:
- WordPress [caption] shortcodes appearing as raw text
- HTML entities like &mdash; not being decoded
- Duplicate featured images appearing in blog post content
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 [caption] shortcodes converted to proper HTML figure/figcaption elements
- [x] #2 HTML entities decoded in excerpts (em-dash, smart quotes, etc.)
- [x] #3 Featured images not duplicated in blog post content
- [x] #4 CSS styling added for figure captions
<!-- AC:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
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
<!-- SECTION:NOTES:END -->