Skip to main content

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/*.yaml or data/*.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.yml file 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

  1. Clone the repository:

    git clone https://github.com/yourusername/hugo-ifier.git
    
  2. 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

hugoifier-0.2.1.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hugoifier-0.2.1-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

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

Hashes for hugoifier-0.2.1.tar.gz
Algorithm Hash digest
SHA256 11ffaf45ce9f9ebb92c78023b9c2fe08d16f0940687b1e2b4542cd0f7b795eb3
MD5 2062be0d1901d03405f96d812c3bc84e
BLAKE2b-256 4c8dad3d09eb992a15758e703ea45ee04e99fd5048ceb5793df8570ed31a908d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugoifier-0.2.1.tar.gz:

Publisher: publish.yml on ConflictHQ/hugoifier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for hugoifier-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 583836a02e67778f0b4ac58ef1f43f83baa3bcad2334868922e127cc7df1e15f
MD5 a48ebec83f792544c93707fca1c4cd05
BLAKE2b-256 e9ce75a08336883e9d3ebbbdc5632d19d554c42be8eb49eb498291713d72bd13

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugoifier-0.2.1-py3-none-any.whl:

Publisher: publish.yml on ConflictHQ/hugoifier

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page