Skip to content

jacobkuzmits/bootdev-static-site-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Site Generator

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.

Setup

Clone the repo and run:

./setup.sh

This installs a git hook that automatically builds the site for production before each commit.

Configuration

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).

Local Development

./main.sh

Builds the site and starts a server at http://localhost:8888.

Or build manually: python3 src/main.py local

Production Build

The git hook handles this automatically, but you can manually build with:

./build.sh

Or: python3 src/main.py production

Tests

./test.sh

Structure

  • content/ - Markdown files
  • static/ - CSS and images
  • docs/ - Generated HTML (what GitHub Pages serves)
  • config.json - Basepath settings
  • src/ - Python source
  • template.html - HTML template

Deployment

GitHub Pages serves the docs/ directory. Push to main and it goes live.

About

Static Site Generator from Boot.dev course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published