Hugoifier

hugoifier / README.md
1
# Hugoifier
2
3
Convert any website to a production-ready [Hugo](https://gohugo.io/) site with [Decap CMS](https://decapcms.org/) — pixel-perfect, no content loss.
4
5
## How it works
6
7
Hugoifier takes three types of input and produces a deployable Hugo site with CMS:
8
9
| Input | Method | AI needed? |
10
|-------|--------|-----------|
11
| **Hugo theme** | Assembles, patches deprecated APIs, adds CMS | No |
12
| **Next.js app** | Captures rendered HTML from dev server | No |
13
| **Raw HTML** | Extracts head/body directly into Hugo templates | No |
14
15
AI is only used as a fallback (Next.js without a running dev server) or for lightweight structural analysis.
16
17
## Quick start
18
19
```bash
20
pip install hugoifier
21
22
# Convert a Hugo theme
23
hugoifier complete themes/my-theme
24
25
# Convert a Next.js app (start your dev server first)
26
hugoifier complete path/to/nextjs-app
27
28
# Convert a raw HTML site
29
hugoifier complete path/to/html-site
30
```
31
32
Output goes to `output/{name}/` — a complete Hugo site ready to serve:
33
34
```bash
35
cd output/my-site && hugo serve
36
```
37
38
## What you get
39
40
- Hugo site with all content, styles, and assets preserved
41
- Decap CMS at `/admin/` with GitHub OAuth (Cloudflare Pages Functions)
42
- `functions/api/auth.js` + `callback.js` for OAuth flow
43
- Whitelabel CMS branding (`--cms-name`, `--cms-logo`, `--cms-color`)
44
45
### Deploy to Cloudflare Pages
46
47
```bash
48
hugo --minify
49
npx wrangler pages deploy public --project-name my-site
50
```
51
52
Set `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` as environment variables for CMS auth.
53
54
## Configuration
55
56
```bash
57
# Choose AI backend (only needed for fallback conversion)
58
HUGOIFIER_BACKEND=anthropic # or openai, google
59
ANTHROPIC_API_KEY=sk-...
60
61
# Whitelabel CMS
62
hugoifier complete my-site --cms-name "My CMS" --cms-logo https://... --cms-color "#515be3"
63
```
64
65
## Development
66
67
```bash
68
git clone https://github.com/ConflictHQ/hugoifier.git
69
cd hugoifier
70
pip install -e ".[dev]"
71
pytest
72
```
73
74
## Built with
75
76
Hugoifier is built on top of two excellent open-source projects:
77
78
- **[Hugo](https://gohugo.io/)** — The world's fastest static site generator. Apache 2.0 licensed. Created by [Steve Francia](https://github.com/spf13) and [Bjarne Pedersen](https://github.com/bep) and [contributors](https://github.com/gohugoio/hugo/graphs/contributors).
79
- **[Decap CMS](https://decapcms.org/)** (formerly Netlify CMS) — Open-source content management for Git workflows. MIT licensed. Maintained by the [Decap community](https://github.com/decaporg/decap-cms/graphs/contributors).
80
81
We're grateful to both communities for building the tools that make this project possible.
82
83
## License
84
85
MIT — see [LICENSE](LICENSE) for details.
86
87
Made by [Conflict](https://weareconflict.com).
88

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button