How kristaps-zakis/python-static-site-generation works
Main Components
A. Input Layer:
• Content Directory (Markdown Files)
• Template System (template.html)
• Static Assets (CSS and images)
B. Processing Core:
• Markdown Parser Components
• HTML Generation System
• Text Processing Units
C. Output Layer:
• Generated HTML Pages
• Compiled Static Assets
Component Relationships and Structure
[Content Layer]
• ▼
[Processing Layer]
• ▼
[Output Layer]
Detailed Component Breakdown
A. Content Layer (Input):
• Markdown files (content/*.md)
• Template files (template.html)
• Static assets (static/*)
B. Processing Layer (Core):
• TextNode Processor (textnode.py)
• HTML Node Generator (htmlnode.py)
• Markdown Parser
• Inline Markdown Processor (inline_markdown.py)
• Block Markdown Processor (markdown_blocks.py)
• Title Extractor (extract_title.py)
• Page Generator (generate_page.py)
C. Output Layer:
• Generated HTML files
• Copied static assets
Key Architectural Patterns to Highlight
• Pipeline Pattern: Show the flow from markdown to HTML
• Component-based Architecture: Separate modules for different responsibilities
• Template System Integration
• Static Asset Management
Implementation Details
• The separation between content and presentation
• The markdown processing pipeline
• The template system's role
• Static asset handling
• Test coverage (show relationship with test files)
In the Processing layer, show the markdown processing pipeline
• [TextNode] → [HTMLNode] → [Markdown Blocks] → [Inline Markdown] → [Page Generator]