A Python-based static site generator for building a portfolio website on GitHub Pages.
This project generates a responsive, modern portfolio website from Python configuration files and Jinja2 templates. Perfect for hosting on aslamhossin.github.io using GitHub Pages.
- Python 3.9 or higher
- pip (Python package manager)
pip install -r requirements.txtEdit config.py to customize:
- Your name, title, and social links
- Project descriptions and links
- Skills and technologies
python generator.pyThis creates a docs/ directory with your static HTML files.
- Create a repository named
aslamhossin.github.ioon GitHub - Push the contents of the
docs/folder to the repository:git init git add docs/ git commit -m "Initial portfolio" git remote add origin https://github.com/aslamhossin/aslamhossin.github.io.git git push -u origin main - Visit
https://aslamhossin.github.ioin your browser
├── config.py # Portfolio configuration
├── generator.py # Site generator script
├── requirements.txt # Python dependencies
├── templates/ # Jinja2 HTML templates
│ ├── index.html # Home page
│ ├── projects.html # Projects page
│ ├── about.html # About page
│ └── 404.html # Error page
├── static/ # CSS and static files
│ └── style.css # Stylesheet
└── docs/ # Generated static site (created by generator)
Edit config.py and add to the projects list:
'projects': [
{
'title': 'Project Name',
'description': 'Project description',
'technologies': ['Python', 'React'],
'github_url': 'https://github.com/...',
'demo_url': 'https://...',
},
]Modify static/style.css to customize the look and feel.
- Create a new Jinja2 template in
templates/ - Add a method in
PortfolioGeneratorclass ingenerator.py - Call the method in
build()
To regenerate the site after making changes:
python generator.pyThis project is open source and available under the MIT License.
Update the email and social links in config.py to match your details.
GitHub: aslamhossin
Portfolio: aslamhossin.github.io