Hedgehog screenshot

Hedgehog is a blogging engine: articles, tags, comments, attachments and search, written in pure PHP and vanilla JavaScript on top of MySQL. No frameworks, no libraries, no build step. Made in 2022 during a college internship, together with a groupmate.

What it does

You drop it on a server, open the installer, enter database credentials and a password, and it sets itself up: creates the tables, writes its own config file, logs you in. Articles are written in a small custom markup language: **bold**, //italic//, links in double parentheses. A bare image URL on its own line becomes an embedded image, consecutive images merge into a gallery, a YouTube link becomes a player. The example YouTube link in the formatting cheat sheet is a rickroll.

Beyond that: a tag system with chip input, live search that highlights matches as you type, anonymous comments, and a calendar view that marks days with posts and uses each day’s first image as the cell background. Three themes ship with it: light, dark, and a green-on-black console theme.

Honest notes

Auth is a single password for the entire blog, stored in plaintext and compared with ==. Read queries interpolate $_GET straight into SQL. The endpoints that create and edit articles never check the session; only the pages do. The calendar is hardcoded to the year 2022. Two core functions are named get_artilces_data and get_artilce_data, and I never noticed.

It worked, and the demo still runs today.