Skip to content

πŸ–₯️ A Python-based static site generator built to learn templating and Markdown processing.

Notifications You must be signed in to change notification settings

heinrichb/bootdotdev_static-site-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–₯️ Static Site Generator (Python)

This repository contains the Static Site Generator project, developed as part of the Boot.dev course. This project focuses on building a static site generator from scratch, enhancing Python development skills and exploring content rendering techniques.

πŸš€ Features

  • Markdown Parsing: Convert .md files into HTML.
  • Template Rendering: Apply consistent templates across all pages.
  • Static Output: Generate a fully navigable static website.
  • CLI Support: Easily run and configure the generator from the command line.
  • Error Handling: Manage invalid files and missing templates gracefully.

πŸ› οΈ Technologies Used

  • Python: Core programming language.
  • Markdown: For content parsing.
  • HTML/CSS: For output styling and layout.
  • Testing: Comprehensive unit tests using Python's unittest module.

πŸ“š What I Learned

  • Parsing and processing Markdown files.
  • Managing file input/output efficiently in Python.
  • Designing templates for dynamic content rendering.
  • Building and managing a CLI-based Python tool.
  • Writing modular, maintainable, and testable Python code.

πŸ§ͺ Testing

Unit tests were created to ensure the generator functions correctly:

  • Parsing Markdown into HTML.
  • Validating template application.
  • Handling missing or invalid files.

Run tests with:

python -m unittest discover tests

🌟 Why This Project?

This project provided valuable hands-on experience with:

  • Content rendering pipelines.
  • Building customizable tools for developers.
  • Understanding how static site generators like Jekyll or Hugo function at a fundamental level.

πŸ“‚ Project Structure

β”œβ”€β”€ generator/       # Core static site generator logic
β”œβ”€β”€ templates/       # HTML templates for pages
β”œβ”€β”€ content/         # Markdown content files
β”œβ”€β”€ output/          # Generated static site
β”œβ”€β”€ tests/           # Unit tests
└── README.md        # Project documentation

πŸ”— Related Resources


Feel free to explore, test, and build upon this project! πŸš€

About

πŸ–₯️ A Python-based static site generator built to learn templating and Markdown processing.

Topics

Resources

Stars

Watchers

Forks

Languages