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.0.tar.gz (29.6 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.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file hugoifier-0.2.0.tar.gz.

File metadata

  • Download URL: hugoifier-0.2.0.tar.gz
  • Upload date:
  • Size: 29.6 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.0.tar.gz
Algorithm Hash digest
SHA256 f541dbe7cab60a3db0dacec26628b565b55d783c1361044a9c5780d621adb0bb
MD5 fd5c40de2d0ea78583450d55f225253b
BLAKE2b-256 ed970e383f74284a697abd525b9f5989c035f7e70bc7ac60af4fbb9fd1f7370f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugoifier-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: hugoifier-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 130a427e4fc7719125baa2c5ba56407f1709ff6631cb273e59a5f790c8916ae2
MD5 23c7edd2db83e8521bca14e92e922041
BLAKE2b-256 78fa9540f464832ed86a309d2c0167ffae9c247d66ea221972751f04f8f1f278

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugoifier-0.2.0-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