top of page

Static Site generator

This project is a custom Static Site Generator (SSG) built in Python as part of my portfolio. It takes Markdown content and converts it into clean, semantic HTML using a flexible and extensible architecture based on custom HTML node classes.

Overview

The static site generator parses markdown files and transforms them into HTML files with nested nodes, supporting various markdown features like headings, lists, links, images, bold/italic text, and code blocks. The core is designed around reusable node classes such as HTMLNode, LeafNode, and ParentNode to represent HTML elements.

Features

  • Parses markdown into a tree of HTML nodes

  • Supports text formatting (bold, italic, code)

  • Supports links and images with proper HTML output

  • Handles nested elements (lists, nested formatting)

  • Modular design with clear separation of parsing and rendering logic

  • Easily extendable for new markdown features or HTML elements

Tech Stack

  • Python

  • Custom classes to represent HTML nodes (HTMLNode, LeafNode, ParentNode)

  • Uses unittest for testing core parsing and rendering functionality

Project Structure

  • htmlnode.py — Defines the HTML node classes and rendering logic

  • textnode.py — Handles text node representations and conversions

  • split_node.py — Contains functions for parsing markdown text and splitting nodes (e.g., bold, italic, links, images)

  • gencontent.py — Contains markdown parsing utilities such as title extraction

  • tests/ — Unit tests for various components ensuring correctness

bottom of page