3.9 KiB
Plan: Add Typography Styles to Blog Posts
TL;DR
The
@tailwindcss/typographyplugin is installed but not registered in the CSS. Add@plugin "@tailwindcss/typography";toBaseLayout.astro, rebuild, verify that blog posts render with proper typography, and commit.Deliverables: 1 modified file (
BaseLayout.astro), build passes, prettier blog rendering Estimated Effort: Quick Parallel Execution: NO — single task
Context
Problem Discovered
After filling all 16 blog posts with real content, the user noticed that posts render as plain text without formatting. Investigation revealed:
BlogLayout.astroalready appliesprose prose-invert prose-zincto the content container- The
@tailwindcss/typographyplugin was not installed (henceprosedid nothing) - Plugin was installed via
npm install -D @tailwindcss/typographyduring diagnosis - The plugin still needs to be registered in the CSS with
@plugin "@tailwindcss/typography";
Root Cause
In Tailwind CSS v4, plugins must be explicitly loaded in the CSS file. The @import "tailwindcss"; in BaseLayout.astro is not enough — the typography plugin requires @plugin "@tailwindcss/typography";.
Work Objectives
Core Objective
Register the typography plugin so that the prose class in BlogLayout.astro actually styles rendered Markdown.
Concrete Deliverables
src/layouts/BaseLayout.astro— add@plugin "@tailwindcss/typography";- Build passes with 0 errors
- Blog posts display styled headings, lists, code blocks, and other Markdown elements
Definition of Done
npm run buildproduces 92+ pages with 0 errors- A rendered blog post shows styled
h2,ul,code, andstrongelements (not plain browser defaults)
Must Have
- Plugin registered correctly for Tailwind v4 syntax (
@plugin) - No visual regressions on non-blog pages
Must NOT Have
- Do NOT install additional unrelated packages
- Do NOT change existing prose classes in
BlogLayout.astro
Execution Strategy
Task 1: Register Typography Plugin
-
1. Register
@tailwindcss/typographypluginWhat to do:
- Edit
src/layouts/BaseLayout.astro - Find the
<style is:global>block with@import "tailwindcss"; - Add
@plugin "@tailwindcss/typography";immediately after the@importline - The result should look like:
@import "tailwindcss"; @plugin "@tailwindcss/typography";
Recommended Agent Profile:
- Category:
quick - Skills: []
Parallelization:
- Can Run In Parallel: NO
- Blocked By: None
Acceptance Criteria:
BaseLayout.astrocontains@plugin "@tailwindcss/typography";
QA Scenarios:
Scenario: Plugin registered Tool: Bash (grep) Steps: 1. grep '@plugin "@tailwindcss/typography"' src/layouts/BaseLayout.astro Expected Result: Match foundCommit: NO (group with verification)
- Edit
Final Verification Wave
-
F1. Build + Visual Check Run
npm run build. Must pass with 0 errors and 92+ pages. Then verify a sample blog post renders with styled typography (headings are larger/bolder, lists have bullets, inline code is monospaced). Output:Build [PASS/FAIL] | Visual [PASS/FAIL] -
F2. Git Commit Stage
src/layouts/BaseLayout.astroandpackage.json/package-lock.json. Commit with message:fix(blog): register @tailwindcss/typography for prose stylingDo NOT push to remote.
Commit Strategy
- F2:
fix(blog): register @tailwindcss/typography for prose styling
Success Criteria
Verification Commands
npm run build # Expected: 92+ pages, 0 errors
grep '@plugin "@tailwindcss/typography"' src/layouts/BaseLayout.astro # Expected: match
Final Checklist
- Plugin registered in CSS
- Build passes
- Blog posts render with styled typography
- Changes committed (not pushed)