|
04b8794…
|
lmata
|
1 |
# Hugoifier |
|
04b8794…
|
lmata
|
2 |
|
|
04b8794…
|
lmata
|
3 |
**AI-powered Hugo theme converter with Decap CMS integration.** |
|
04b8794…
|
lmata
|
4 |
|
|
04b8794…
|
lmata
|
5 |
Hugoifier converts any HTML/CSS theme into a production-ready Hugo site — complete with layouts, content structure, and a fully configured Decap CMS admin panel. Supports Anthropic Claude, OpenAI GPT-4, and Google Gemini as AI backends. |
|
04b8794…
|
lmata
|
6 |
|
|
04b8794…
|
lmata
|
7 |
--- |
|
04b8794…
|
lmata
|
8 |
|
|
04b8794…
|
lmata
|
9 |
## Features |
|
04b8794…
|
lmata
|
10 |
|
|
04b8794…
|
lmata
|
11 |
- **HTML → Hugo** — AI converts raw HTML/CSS templates into valid Hugo Go template files with proper partials, blocks, and template variables |
|
04b8794…
|
lmata
|
12 |
- **Multi-backend AI** — Route to Anthropic (default), OpenAI, or Google Gemini via `HUGOIFIER_BACKEND` |
|
04b8794…
|
lmata
|
13 |
- **Decap CMS out of the box** — Auto-generates `static/admin/config.yml` by introspecting your content structure, including deeply nested collections |
|
04b8794…
|
lmata
|
14 |
- **Hugo API modernization** — Automatically patches deprecated Hugo APIs (`.Site.DisqusShortname`, `.Site.GoogleAnalytics`, `paginate`, etc.) for Hugo ≥ v0.128 |
|
04b8794…
|
lmata
|
15 |
- **Whitelabel CMS** — Customize the Decap admin panel name, logo, and color per deployment |
|
04b8794…
|
lmata
|
16 |
- **Smart theme detection** — Handles messy zip-extracted directory structures, skips `__MACOSX` artifacts, detects `exampleSite` automatically |
|
04b8794…
|
lmata
|
17 |
- **Docker support** — Fully containerized with `docker-compose.yml` |
|
04b8794…
|
lmata
|
18 |
|
|
04b8794…
|
lmata
|
19 |
## Quick Start |
|
04b8794…
|
lmata
|
20 |
|
|
04b8794…
|
lmata
|
21 |
```bash |
|
04b8794…
|
lmata
|
22 |
# Install dependencies |
|
04b8794…
|
lmata
|
23 |
pip install -r requirements.txt |
|
04b8794…
|
lmata
|
24 |
|
|
04b8794…
|
lmata
|
25 |
# Set your AI backend key |
|
04b8794…
|
lmata
|
26 |
export ANTHROPIC_API_KEY=your_key_here |
|
04b8794…
|
lmata
|
27 |
|
|
04b8794…
|
lmata
|
28 |
# Convert a Hugo theme |
|
04b8794…
|
lmata
|
29 |
python src/cli.py complete themes/my-theme |
|
04b8794…
|
lmata
|
30 |
|
|
04b8794…
|
lmata
|
31 |
# Convert raw HTML |
|
04b8794…
|
lmata
|
32 |
python src/cli.py complete path/to/html-theme/ |
|
04b8794…
|
lmata
|
33 |
|
|
04b8794…
|
lmata
|
34 |
# Output goes to output/{theme-name}/ by default |
|
04b8794…
|
lmata
|
35 |
cd output/my-theme && hugo serve |
|
04b8794…
|
lmata
|
36 |
``` |
|
04b8794…
|
lmata
|
37 |
|
|
04b8794…
|
lmata
|
38 |
## Installation |
|
04b8794…
|
lmata
|
39 |
|
|
04b8794…
|
lmata
|
40 |
=== "From source" |
|
04b8794…
|
lmata
|
41 |
|
|
04b8794…
|
lmata
|
42 |
```bash |
|
04b8794…
|
lmata
|
43 |
git clone https://github.com/ConflictHQ/hugoifier.git |
|
04b8794…
|
lmata
|
44 |
cd hugoifier |
|
04b8794…
|
lmata
|
45 |
pip install -r requirements.txt |
|
04b8794…
|
lmata
|
46 |
``` |
|
04b8794…
|
lmata
|
47 |
|
|
04b8794…
|
lmata
|
48 |
=== "Docker" |
|
04b8794…
|
lmata
|
49 |
|
|
04b8794…
|
lmata
|
50 |
```bash |
|
04b8794…
|
lmata
|
51 |
git clone https://github.com/ConflictHQ/hugoifier.git |
|
04b8794…
|
lmata
|
52 |
cd hugoifier |
|
04b8794…
|
lmata
|
53 |
ANTHROPIC_API_KEY=your_key docker compose up |
|
04b8794…
|
lmata
|
54 |
``` |
|
04b8794…
|
lmata
|
55 |
|
|
04b8794…
|
lmata
|
56 |
## Requirements |
|
04b8794…
|
lmata
|
57 |
|
|
04b8794…
|
lmata
|
58 |
- Python 3.11+ |
|
04b8794…
|
lmata
|
59 |
- At least one AI API key: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `GOOGLE_API_KEY` |
|
04b8794…
|
lmata
|
60 |
- Hugo extended (for building the output site) |
|
04b8794…
|
lmata
|
61 |
|
|
04b8794…
|
lmata
|
62 |
## Pipeline Overview |
|
04b8794…
|
lmata
|
63 |
|
|
04b8794…
|
lmata
|
64 |
``` |
|
04b8794…
|
lmata
|
65 |
Input (Hugo theme or raw HTML) |
|
04b8794…
|
lmata
|
66 |
↓ |
|
04b8794…
|
lmata
|
67 |
[Theme Finder] — detect Hugo theme vs raw HTML |
|
04b8794…
|
lmata
|
68 |
↓ |
|
04b8794…
|
lmata
|
69 |
[Hugoify] — AI converts HTML → Hugo layouts (raw HTML only) |
|
04b8794…
|
lmata
|
70 |
↓ |
|
04b8794…
|
lmata
|
71 |
[Assemble] — copy theme + exampleSite, write hugo.toml |
|
04b8794…
|
lmata
|
72 |
↓ |
|
04b8794…
|
lmata
|
73 |
[Theme Patcher] — fix deprecated Hugo APIs |
|
04b8794…
|
lmata
|
74 |
↓ |
|
04b8794…
|
lmata
|
75 |
[Decapify] — generate Decap CMS config from content structure |
|
04b8794…
|
lmata
|
76 |
↓ |
|
04b8794…
|
lmata
|
77 |
output/{theme-name}/ ← ready to run with hugo serve |
|
04b8794…
|
lmata
|
78 |
``` |
|
04b8794…
|
lmata
|
79 |
|
|
04b8794…
|
lmata
|
80 |
## License |
|
04b8794…
|
lmata
|
81 |
|
|
04b8794…
|
lmata
|
82 |
MIT License — Copyright © 2026 CONFLICT LLC. All rights reserved. |