diff --git a/DESIGN.md b/DESIGN.md index 19a693f..6063a13 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -11,7 +11,7 @@ There are two related projects: 1. **thingamablog-api** (`projects/thingamablog-api/`): Contains the Java export tool for data extraction 2. **thingamablog-v2** (`projects/thingamablog-v2/`): Contains the web app for browsing the extracted data -No Git repositories are set up for these folders yet. +No Git repositories are set up for these folders. ## Problem Statement @@ -157,6 +157,25 @@ App | Frontend | React/Material-UI | Modern, component-based UI | | Images | Static serving | Direct file access for performance | +### Static Assets & Image Handling + +#### Image Storage Location +- **Path:** `/home/paulh/.openclaw/workspace/docs/pauls-blogs/Paul/1096292361887/web` +- **Contents:** ~3.2MB of image files (JPG, GIF) from original blog posts +- **Examples:** Robotics photos, running/training images, technical diagrams, circuit schematics +- **Date Range:** Images from 2004-2009 blog posts + +#### Image Serving +- **URL Path:** `/1096292361887/web/*` (preserves original blog structure) +- **Implementation:** Express.static middleware serves files directly +- **Fallback:** Root path `/` also serves images for compatibility + +#### Image URL Rewriting +- **Problem:** Original blog posts contain Windows file paths (`file:///\\paulspc2\...\Weblogs/FILENAME.jpg`) +- **Solution:** Backend rewrites image src attributes to HTTP URLs (`http://localhost:3637/FILENAME.jpg`) +- **Regex Pattern:** Converts Windows UNC paths to web-accessible URLs +- **Benefit:** Images display correctly without manual editing of HTML content + ### File Structure ``` projects/