AI-powered Hugo theme converter with Decap CMS integration
Project description
Hugoifier (AI-Powered Theme Converter)
A utility that takes your HTML template/website or Hugo them and generates a production-ready Hugo theme with Decap CMS integration.
What is it?
Hugoifier is a Python-based utility that:
- Converts any HTML/JS/CSS theme into a Hugo-compatible theme using AI.
- Extracts layout data into structured files (
data/*.yamlordata/*.json) to make the theme editable via Decap CMS. - Generates and wires Decap CMS into the Hugo setup, making it fully ready for content management.
- Uses OpenAI's efficient AI models to analyze theme files and determine the best Hugo template tag placements.
Core Features & Workflow
Step 1: AI-Powered HTML Conversion
- Uses GPT-4-Turbo to analyze an HTML theme and suggest where Hugo template tags (
{{ .Title }},{{ .Content }}, etc.) should be placed. - Identifies partials (e.g.,
header.html,footer.html) and reusable elements. - Converts all hardcoded links, images, and text into Hugo-friendly components.
Step2 2: Decap CMS Integration
- Extracts the site structure elements (navigation, hero sections, footers) into YAML/JSON files in Hugo's
data/directory. - Generates a Decap CMS
config.ymlfile with proper collections for pages, posts, and layout elements. - Ensures the generated theme is fully editable via Decap CMS.
Step3 3: Automation & Deployment
- Provides a Python CLI tool to automate the entire conversion process.
- Offer interactive mode for customization and auto mode for full automation.
- Ensure themes are deployable on Cloudflare Pages CMS setups.
- Deploy the CMS on Cloudflare Pages.
Getting Started
Prerequisites
- Python 3.11.4
- Hugo extended version
- OpenAI API key
- Cloudflare account (for deployment)
Installation
-
Clone the repository:
git clone https://github.com/yourusername/hugo-ifier.git
-
Install the required Python packages:
pip install -r requirements.txt
Usage
Run the CLI tool to start the conversion process:
python cli.py convert --input theme.html --output hugo-theme
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hugoifier-0.2.1.tar.gz.
File metadata
- Download URL: hugoifier-0.2.1.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11ffaf45ce9f9ebb92c78023b9c2fe08d16f0940687b1e2b4542cd0f7b795eb3
|
|
| MD5 |
2062be0d1901d03405f96d812c3bc84e
|
|
| BLAKE2b-256 |
4c8dad3d09eb992a15758e703ea45ee04e99fd5048ceb5793df8570ed31a908d
|
Provenance
The following attestation bundles were made for hugoifier-0.2.1.tar.gz:
Publisher:
publish.yml on ConflictHQ/hugoifier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hugoifier-0.2.1.tar.gz -
Subject digest:
11ffaf45ce9f9ebb92c78023b9c2fe08d16f0940687b1e2b4542cd0f7b795eb3 - Sigstore transparency entry: 1118727889
- Sigstore integration time:
-
Permalink:
ConflictHQ/hugoifier@c6d121cd2bf5b580fb2c1b5ca9859f943475f5a1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/ConflictHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6d121cd2bf5b580fb2c1b5ca9859f943475f5a1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hugoifier-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hugoifier-0.2.1-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
583836a02e67778f0b4ac58ef1f43f83baa3bcad2334868922e127cc7df1e15f
|
|
| MD5 |
a48ebec83f792544c93707fca1c4cd05
|
|
| BLAKE2b-256 |
e9ce75a08336883e9d3ebbbdc5632d19d554c42be8eb49eb498291713d72bd13
|
Provenance
The following attestation bundles were made for hugoifier-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on ConflictHQ/hugoifier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hugoifier-0.2.1-py3-none-any.whl -
Subject digest:
583836a02e67778f0b4ac58ef1f43f83baa3bcad2334868922e127cc7df1e15f - Sigstore transparency entry: 1118727940
- Sigstore integration time:
-
Permalink:
ConflictHQ/hugoifier@c6d121cd2bf5b580fb2c1b5ca9859f943475f5a1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/ConflictHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6d121cd2bf5b580fb2c1b5ca9859f943475f5a1 -
Trigger Event:
release
-
Statement type: