A modern, lightweight, and interactive blog platform built with Flask, HTMX, and TailwindCSS. Optimized for easy deployment on Render.
- Lightning Fast: HTMX provides instant interactions without SPA complexity
- Simple & Reliable: Flask backend with proven stability
- Beautiful Design: TailwindCSS with dark mode support
- Developer Friendly: Clean Python code with modular architecture
- Interactive: Smooth filtering and dynamic content loading
- SEO Friendly: Server-side rendering with progressive enhancement
- Easy Deployment: Ready for Render with one-click deployment
- HTMX - Dynamic HTML interactions
- TailwindCSS - Utility-first CSS framework
- Alpine.js - Minimal JavaScript for interactivity
- Flask - Simple and reliable Python web framework
- Gunicorn - Production WSGI server
- Jinja2 - Template engine
- Python-Frontmatter - Markdown with metadata support
- Render - Cloud hosting platform
- Gunicorn - Production server
staticle/
βββ app.py # Flask application (main entry point)
βββ Procfile # Render deployment config
βββ runtime.txt # Python version specification
βββ requirements.txt # Python dependencies
βββ scripts/ # Build and development scripts
β βββ start.sh # Development server
β βββ setup.sh # Environment setup
β βββ build.sh # Production build
β βββ deploy-render.sh # Render deployment
βββ core/ # Core application modules
β βββ __init__.py # Package initialization
β βββ blog_manager.py # Blog content management
β βββ config.py # Application configuration
β βββ utils.py # Utility functions
βββ views/ # Template files
β βββ base.html # Base template
β βββ index.html # Homepage
β βββ blog.html # Blog listing
β βββ blog_post.html # Individual post
β βββ portfolio.html # Portfolio page
β βββ 404.html # Error page
β βββ components/ # Reusable components
βββ assets/ # Static files
β βββ js/ # JavaScript files
β βββ img/ # Images
βββ content/ # Blog content
βββ posts/ # Markdown blog posts
# Clone the repository
git clone <your-repository-url>
cd staticle
# Set up development environment
chmod +x scripts/*.sh
./scripts/setup.sh
# Start development server
./scripts/start.sh
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start Flask development server
python app.py
- Main Site: http://localhost:5001
- Blog: http://localhost:5001/blog
- Portfolio: http://localhost:5001/portfolio
Create markdown files in content/posts/
with frontmatter:
---
title: "Your Post Title"
date: 2025-06-16
category: "Technology"
tags: ["python", "web", "htmx"]
excerpt: "A brief description of your post"
---
# Your Post Content
Write your content in markdown here...
- Dynamic content loading without page refreshes
- Progressive enhancement approach
- Server-side rendering with client-side interactions
- Simple and reliable Python framework
- Easy to understand and maintain
- Extensive ecosystem and community support
- Perfect for content-driven websites
- Clean separation of concerns
- Reusable components in
core/
directory - Easy to extend and maintain
- Connect Repository: Link your GitHub repository to Render
- Auto-Deploy: Render will automatically detect the Flask app
- Environment: Python 3.11.0 (specified in
runtime.txt
) - Build Command:
pip install -r requirements.txt
- Start Command:
gunicorn app:app
(fromProcfile
)
# Deploy to Render
./scripts/deploy-render.sh
# Test production build locally
./scripts/build.sh
- Backend: Add routes in
app.py
- Core Logic: Create modules in
core/
directory - Frontend: Create templates in
views/
- Components: Add HTMX components in
views/components/
- Styling: Use TailwindCSS classes
- Content: Add markdown files to
content/posts/
# Development server
./scripts/start.sh
# Environment setup
./scripts/setup.sh
# Production build test
./scripts/build.sh
# Deploy to Render
./scripts/deploy-render.sh
# Start development server
python app.py
# Test blog functionality
curl http://localhost:5001/blog
# Test individual post
curl http://localhost:5001/blog/your-post-slug
This project has been migrated from FastAPI to Flask for:
- Simpler deployment on Render
- Better compatibility with traditional hosting
- Easier maintenance and understanding
- Faster development cycle
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Create an issue for bug reports
- Discussions for feature requests
- Check existing issues before creating new ones
Built with β€οΈ using Flask, HTMX, and TailwindCSS. Ready for deployment on Render.