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.
- 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.
- Python: Core programming language.
- Markdown: For content parsing.
- HTML/CSS: For output styling and layout.
- Testing: Comprehensive unit tests using Python's
unittest
module.
- 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.
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
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.
βββ 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
Feel free to explore, test, and build upon this project! π