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