Download the PHP package alienlebarge/handle without Composer
On this page you can find all versions of the php package alienlebarge/handle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alienlebarge/handle
More information about alienlebarge/handle
Files in alienlebarge/handle
Package handle
Short Description A Kirby plugin that automatically transforms social handles into links to their profiles
License MIT
Informations about the package handle
Handle Plugin for Kirby CMS
A Kirby plugin that automatically transforms social handles (like @user@instance
) into clickable links to their profiles. Supports Unicode characters, custom services, and comprehensive configuration options.
Installation
Download
Download and place this plugin in /site/plugins/handle
.
Composer
Git
Usage
Field Method
Automatic
The plugin automatically processes all texts passed through kirbytext.
KirbyTag
or
Configuration
Configure the plugin in your config.php
file:
See CONFIG.md for detailed configuration options and examples.
Default Supported Services
- Fediverse (Mastodon, etc.)
- Bluesky (bsky.app)
- Flickr
- GitHub
- Micro.blog
- YouTube
- Vimeo
Migration from v0.0.3
If upgrading from v0.0.3, update your configuration:
Before:
After:
License
MIT
Features
- Automatic Processing: Transforms handles via
kirbytext:before
hook - Unicode Support: Works with international usernames and domains
- Security: XSS protection with input validation and sanitization
- Performance: Optimized with early returns and configurable text size limits
- Extensible: Easy to add custom services and configure behavior
- Code Protection: Preserves handles in code blocks and backticks
Requirements
- PHP >= 7.4
- Kirby CMS >= 3.0
Advanced Usage
In your templates
The plugin works in several ways:
-
Automatically (via the
kirbytext:before
hook): -
Manually (via the field method):
-
Via KirbyTag:
or
Adding Custom Services
Service Configuration Options:
enabled
(bool): Enable/disable this serviceurlPrefix
(string, required): Base URL for user profilesurlSuffix
(string): Optional suffix added to URLsclass
(string, required): CSS class for styling linksdisplayUsername
(bool): Show only@username
(true) or@username@instance
(false)name
(string): Human-readable service name for documentation
Validation Rules:
- URL Format: Must be valid HTTP/HTTPS URLs
- CSS Classes: Must follow CSS naming conventions (
[a-zA-Z][a-zA-Z0-9\-_]*
) - Required Fields:
urlPrefix
andclass
are mandatory