When Flesh and Muscles Are Too Much
A Python static site generator with multi-language and multi-site support.
-
Setup VENV & Install Dependencies
python -m venv venv
venv\Scripts\activate
python -m pip install --upgrade pip
pip install -r requirements.txt
-
Initialize New Site
python init.py your-site-name
-
Configure Environment
# .env file DATA_FOLDER=data SITE_NAME=your-site-name BUILD_ENV=dev -
Build Site
python gen.py # Development python gen.py --env prod # Production python gen.py --verbose # Debug output python gen.py -sfp content/posts/2025/2025-01-15-my-post/my-post.md # Single file (fast)
root/
├── README.md
├── requirements.txt
├── gen.py # Main generator
├── .env # Environment configuration
│
├── themes/ # Available themes
│ └── default/ # Default theme
│ │ ├── templates/ # Jinja2 templates
│ │ │ ├── base.html
│ │ │ ├── post.html
│ │ │ ├── page.html
│ │ │ ├── landing.html
│ │ │ ├── feed.xml
│ │ │ └── sitemap.xml
│ │ ├── assets/ # Theme assets
│ │ │ ├── css/
│ │ │ ├── fonts/
│ │ │ └── images/
│ │ └── partials/ # Template partials
│ │ ├── _macros.html
│ │ └── _schema.html├── sites/ # Site data directory
│ └── your-site/ # Site configuration
│ ├── config/
│ │ ├── build.yml # Build settings
│ │ ├── content/ # Content configuration
│ │ │ ├── site.yml
│ │ │ ├── pages.yml
│ │ │ └── languages/
│ │ │ ├── fi.yml
│ │ │ └── en.yml
│ │ └── setup.json # Generated config
│ ├── content/
│ │ ├── posts/ # Blog posts
│ │ │ └── 2024/
│ │ │ └── 2024-12-31-post-name/
│ │ │ ├── 2024-12-31-post-name.md
│ │ │ └── images/
│ │ └── pages/ # Static pages
│ │ ├── about/
│ │ └── landing/
│ └── assets/ # Site assets
│
└── z-public/ # Generated output
└── your-site/
├── dev/ # Development build
└── prod/ # Production buildCreate a site with init.py and see the config folder. Generator creates a config object dynamically using the folders and .yml file names in the config folder (and sub folders).
- Load Config: Environment and YAML files
- Discover Content: Scan content directories
- Process Content: Parse markdown, enrich metadata
- Generate Site: Render templates
- Validate Site: Check links and integrity
python init.py site-name # Create new site
python gen.py # Build site
python gen.py --env prod # Production build
python gen.py --verbose # Debug output
python gen.py -sfp path/to/file.md # Single file build (fast)For large sites you can do fast iteration while writing posts.
Use the single file build mode:
python gen.py -s site-name -sf sites -sfp c:/site/content/posts/2025/2025-01-15-my-post/my-post.md- Use absolute file path
- Fast
- Skips dependencies and validation
- Remember to do a full build before publishing
- Python 3.8+
- See
requirements.txt