Files
markitect-main/examples/image-assets/project_documentation.md
tegwick 3a353b4d4f
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
feat: implement comprehensive asset shipping for md-render command
Add automatic asset copying when rendering markdown to different output
directories with intelligent defaults and full user control.

Key Features:
- Environment variable support: MARKITECT_OUTPUT_DIR sets default output directory
- Smart defaults: auto-ship assets for directory output, disabled for file output
- CLI control flags: --ship-assets and --no-ship-assets for explicit control
- Timestamp-based copying: only copies when source newer than destination
- Path preservation: maintains relative directory structure in output
- Graceful error handling: missing assets logged as warnings, not failures

Technical Implementation:
- Enhanced asset discovery in markitect/assets/discovery.py with discover_assets_from_markdown()
- Added environment variable priority: CLI --output > MARKITECT_OUTPUT_DIR > input directory
- Comprehensive asset shipping logic with _ship_assets() function
- Directory vs file output detection for intelligent default behavior

Examples and Testing:
- Added image-assets example directory with 6 sample images and comprehensive README
- Created comprehensive TDD test suite with 10 tests covering all functionality
- Tests validate environment variables, CLI flags, asset discovery, shipping logic,
  timestamp handling, missing assets, path preservation, and default behaviors

Usage:
  markitect md-render file.md -o /output/dir/     # Auto-ships assets
  markitect md-render file.md --no-ship-assets   # Suppresses shipping
  MARKITECT_OUTPUT_DIR=/docs markitect md-render file.md  # Uses env var

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:12:44 +01:00

71 lines
2.1 KiB
Markdown

# Project Documentation Example
## Overview
This document demonstrates MarkiTect's image asset management capabilities by embedding various types of images commonly used in technical documentation.
## Architecture Diagram
The following diagram shows the overall system architecture:
![System Architecture](images/architecture_diagram.png)
*Figure 1: High-level system architecture showing component interactions*
## User Interface Screenshots
### Dashboard View
The main dashboard provides an overview of system status:
![Dashboard Screenshot](images/dashboard_screenshot.png)
*Figure 2: Main dashboard interface with key metrics and navigation*
### Settings Panel
Users can configure system behavior through the settings panel:
![Settings Panel](images/settings_panel.png)
*Figure 3: Configuration interface for system preferences*
## Logo and Branding
### Company Logo
![Company Logo](images/company_logo.png)
### Project Icon
The project uses this icon throughout the interface:
![Project Icon](images/project_icon.png)
## Asset Management Features
MarkiTect provides several key features for managing image assets:
1. **Content-Addressable Storage**: Images are stored using SHA-256 hashes to prevent duplication
2. **Automatic Deduplication**: Identical images are only stored once, regardless of filename
3. **Relative Path Resolution**: Images can be referenced using relative paths from the markdown file
4. **Asset Tracking**: All referenced assets are tracked and validated during document processing
## Performance Metrics
The following chart shows system performance over time:
![Performance Chart](images/performance_chart.png)
*Figure 4: System performance metrics showing response time and throughput*
## Conclusion
This example demonstrates how MarkiTect seamlessly handles multiple image assets within a single document, providing:
- Efficient storage through deduplication
- Reliable asset resolution
- Clean integration with markdown syntax
- Support for various image formats (PNG, JPG, SVG, etc.)
All images in this document will be processed through MarkiTect's asset management system when the document is rendered or packaged.