Static Site Generator
ReadyAbout
Python-based portfolio generator with Jinja2 templating, real-time file monitoring, and automated GitHub Pages deployment. The tool you're using right now to build this portfolio.
Motivation
While building my portfolio, I realized I was manually copying HTML across pages and fighting with template inconsistencies. I needed a tool that could generate a multi-page site from templates while maintaining design consistency and enabling rapid iteration. This generator became the foundation of my entire portfolio workflow.
Use Cases
Portfolio Development
Rapidly iterate on portfolio design with instant regeneration and preview
Template Reuse
Maintain consistent design across multiple pages with template inheritance
Automated Deployment
Push changes to GitHub and automatically deploy to live site
Content Management
Update portfolio content by editing simple JSON files instead of HTML
Examples
Core Generator Logic
def generate():
os.makedirs('portfolio-site', exist_ok=True)
with open('projects.json', 'r') as file:
data = json.load(file)
projects = data['projects']
env = Environment(loader=FileSystemLoader('templates'))
# Generate all pages
for template_name in ['portfolio.html', 'projects.html', 'resume.html']:
template = env.get_template(template_name)
output = template.render(projects=projects)
with open(f'portfolio-site/{template_name}', 'w') as f:
f.write(output)
Key Achievements
- Built Python generator with Jinja2 templating engine supporting template inheritance and dynamic content injection from JSON
- Implemented two-repository architecture separating build tool from deployment site with automated CI/CD pipeline
- Designed recursive directory traversal system for copying static assets with real-time file system monitoring using watchdog library
- Created watch mode with automated regeneration enabling rapid development iteration and immediate preview