A Python-based static site generator that converts Markdown to HTML. Built following the Boot.dev static site generator course.
Takes Markdown files from content/ and generates a static website in docs/. Supports all the usual Markdown stuff: headings, links, images, code blocks, lists, and blockquotes.
Clone the repo and run:
./setup.shThis installs a git hook that automatically builds the site for production before each commit.
Edit config.json to set your basepaths:
{
"basepath": {
"local": "/",
"production": "/bootdev-static-site-generator/"
}
}Change production to match your GitHub Pages URL (e.g., /your-repo-name/ or just / for custom domains).
./main.shBuilds the site and starts a server at http://localhost:8888.
Or build manually: python3 src/main.py local
The git hook handles this automatically, but you can manually build with:
./build.shOr: python3 src/main.py production
./test.shcontent/- Markdown filesstatic/- CSS and imagesdocs/- Generated HTML (what GitHub Pages serves)config.json- Basepath settingssrc/- Python sourcetemplate.html- HTML template
GitHub Pages serves the docs/ directory. Push to main and it goes live.