A Python-based static site generator that converts markdown files to HTML pages using customizable templates.
- Markdown to HTML conversion
- Template-based page generation
- Static file handling
- Built-in development server
- Comprehensive test suite
.
├── README.md
├── content
│ ├── index.md
│ └── majesty
│ └── index.md
├── main.sh
├── src
│ ├── __init__.py
│ ├── copy_static.py
│ ├── gen_content.py
│ ├── htmlnode.py
│ ├── inline_markdown.py
│ ├── main.py
│ ├── markdown_blocks.py
│ ├── tests
│ │ ├── __init__.py
│ │ ├── test_extract_title.py
│ │ ├── test_htmlnode.py
│ │ ├── test_inline_markdown.py
│ │ ├── test_leafnode.py
│ │ ├── test_markdown_blocks.py
│ │ ├── test_parentnode.py
│ │ └── test_textnode.py
│ └── textnode.py
├── static
│ ├── images
│ │ └── rivendell.png
│ └── index.css
├── template.html
└── test.sh
- Clone the repository
- Ensure Python 3.x is installed
- No additional dependencies required
git clone <repo-url>
./main.shThe site will be available at http://localhost:8888
./test.shThe test suite includes:
- Unit tests for markdown parsing
- Text node manipulation tests
- Title extraction validation
- Integration tests for page generation
Input markdown:
# Hello World
This is **markdown**
Generates:
<h1>Hello World</h1>
<p>This is <b>markdown</b></p>
- Reads markdown from content/ directory
- Converts markdown to HTML using custom parser
- Applies template from template.html
- Copies static assets to public/ directory