Skip to content

Wordpress plugin. URL shortener & automation slug generator with DeepLX and ChatGPT API support

License

Notifications You must be signed in to change notification settings

Hootrix/wp-sluger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Sluger

A WordPress plugin that automates the generation of SEO-friendly URL slugs using DeepLX and ChatGPT API.

Features

  • Automatically generate SEO-friendly slugs for posts and pages
  • Support for both DeepLX and ChatGPT API
  • Multiple language styles:
    • English Translation
    • Chinese Pinyin
    • Romanization (For non-Latin scripts)
    • Keep Original (just sanitize)
    • Custom Style with custom prompts
  • Real-time API connection testing
  • Support for custom ChatGPT models
  • Detailed error logging for troubleshooting

Slug Update Logic

  • The plugin only triggers slug generation when the post/page title is changed
  • If you modify other content without changing the title, the slug remains unchanged
  • This prevents unnecessary API calls and maintains URL stability

Installation

  1. Download the plugin zip file
  2. Go to WordPress admin panel > Plugins > Add New
  3. Click "Upload Plugin" and choose the downloaded zip file
  4. Click "Install Now" and then "Activate"

Configuration

  1. Go to Settings > WP Sluger

  2. Choose your preferred translation service:

    • DeepLX: Free and self-hosted translation service
    • ChatGPT: OpenAI's powerful language model
  3. Configure the API settings:

  4. Choose your preferred language style:

    • English Translation: Convert any language to English
    • Chinese Pinyin: Convert Chinese characters to Pinyin
    • Romanization: Convert non-Latin scripts to Latin alphabet
    • Keep Original: Just sanitize the title without translation
    • Custom Style: Use your own prompt template
  5. For Custom Style:

    • Write your own prompt template
    • Use {title} as a placeholder for the post title
    • Example prompts:
       Convert to Pinyin and create URL alias: {title}
       Example 2: Translate to English alias: {title}
       Example 3: Create URL alias using Japanese romaji: {title}
      

License

GPL v2 or later

Credits

About

Wordpress plugin. URL shortener & automation slug generator with DeepLX and ChatGPT API support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published