A simple static site generator with Jinja2 templates, JSON content, and Cloudflare Pages deployment.
./onboard.shThis will:
- Configure your site (domain, title, description)
- Create a GitHub repository
- Set up Cloudflare Pages project
- Configure deployment secrets
- Deploy your site
- GitHub CLI -
brew install gh - Wrangler CLI -
npm install -g wrangler - Python 3.8+
-
Configure your site
# Edit site/config.json with your domain and title -
Test locally
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt python build.py # Open dist/index.html in browser
-
Deploy
- Push to GitHub
- Set repository secrets:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
- Set repository variable:
CLOUDFLARE_PROJECT_NAME
├── site/
│ ├── config.json # Site configuration
│ ├── content/
│ │ ├── homepage.json # Homepage content
│ │ └── articles/
│ │ └── my-post.json # Article files
│ └── media/
│ └── images/ # Images and assets
├── templates/
│ ├── base.html # Base layout
│ ├── homepage.html # Homepage template
│ └── article.html # Article template
├── shared/
│ └── style.css # Styles
├── build.py # Build script
└── onboard.sh # Onboarding script
{
"domain": "example.com",
"title": "My Site",
"description": "Site description for SEO",
"language": "en"
}{
"title": "Article Title",
"description": "SEO description",
"date": "2024-01-15",
"author": "Author Name",
"image": "/media/images/hero.jpg",
"tags": ["tag1", "tag2"],
"content": "Markdown content here..."
}# Build site
python build.py
# Output in dist/MIT