landing-page-generator

The Good Landing Page Generator

A WordPress plugin that generates beautiful landing pages from YAML content. Perfect for use with AI tools like Claude to quickly create professional landing pages.

Features

Requirements

Installation

From GitHub

  1. Download or clone this repository
  2. Upload the the-good-landing-page-generator folder to /wp-content/plugins/
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Go to LP Generator in the admin menu

For Development

# Clone the repository
git clone https://github.com/your-org/the-good-landing-page-generator.git

# Install dependencies for testing
cd the-good-landing-page-generator
npm install

# Run tests
npm test

Usage

Basic Workflow

  1. Get YAML from Claude: Use the prompt template in docs/claude-prompt-template.md to generate landing page content
  2. Paste YAML: Go to LP Generator in WordPress admin and paste your YAML
  3. Generate HTML: Click “Generate HTML” to process the template
  4. Create Page: Click “Create Page” to create a new WordPress page with the content
  5. Edit Visually: You’ll be redirected to the Gutenberg editor where you can fine-tune the page

Example YAML

Main Headline: 'Transform Your Business with AI-Powered Solutions'
Sub-headline: 'Increase efficiency by 300% and reduce costs'
Primary CTA Button: 'Get Started Today'
Value Proposition: 'We help businesses leverage AI technology'
Pain point 1: 'Too much time on manual tasks'
Pain point 2: 'Unable to scale without more staff'
Pain point 3: 'Missing opportunities'

Tips

Settings

Go to LP Generator → Settings to configure:

Developer Documentation

Hooks and Filters

The plugin provides several hooks for customization:

Filters

// Modify template before processing
add_filter('tglp_template_content', function($template) {
    return $template;
});

// Modify HTML before page creation
add_filter('tglp_generated_html', function($html) {
    return $html;
});

// Modify page creation arguments
add_filter('tglp_page_args', function($args, $html) {
    $args['post_status'] = 'publish';
    return $args;
}, 10, 2);

Actions

// Before page is created
add_action('tglp_before_page_create', function($html) {
    // Do something before page creation
});

// After page is created
add_action('tglp_after_page_create', function($page_id, $html) {
    // Do something after page creation
}, 10, 2);

// When admin page loads
add_action('tglp_admin_page_loaded', function() {
    // Customize admin page
});

Testing

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Generate coverage report
npm run test:coverage

File Structure

the-good-landing-page-generator/
├── the-good-landing-page-generator.php    # Main plugin file
├── uninstall.php                          # Cleanup on uninstall
├── readme.txt                             # WordPress.org readme
│
├── includes/
│   ├── class-plugin.php                   # Core plugin functionality
│   ├── class-settings.php                 # Settings page
│   └── class-ajax-handler.php             # AJAX endpoints
│
├── admin/
│   ├── class-admin-page.php               # Admin page controller
│   └── views/
│       └── generator-page.php             # Generator UI
│
├── assets/
│   ├── css/admin.css                      # Admin styles
│   ├── js/generator.js                    # Generator JavaScript
│   ├── js/js-yaml.min.js                  # YAML parser
│   └── examples/                          # Example YAML files
│
├── templates/
│   └── landing-page.html                  # Landing page template
│
├── docs/
│   └── claude-prompt-template.md          # Claude prompt template
│
└── package.json                           # NPM configuration

Changelog

1.0.0

License

GPL v2 or later

Credits

Built by The Good