vaersaagod / bunnymate
Keeping your bunny finely-tuned for a hoppy life, mate!
Installs: 67
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:craft-plugin
pkg:composer/vaersaagod/bunnymate
Requires
- php: ^8.2
 - craftcms/cms: ^5.1.0
 
README
Keeping your bunny finely-tuned for a hoppy life, mate!
Description
BunnyMate integrates BunnyCDN with Craft CMS.
Requirements
This plugin requires Craft CMS 5.0.0 or later.
Disclaimer
This is a private plugin, made for Værsågod and friends.
Migrating from vaersaagod/bunny
ddev craft plugin/uninstall bunny && ddev composer remove vaersaagod/bunnyddev composer require vaersaagod/bunnymate && ddev craft plugin/install _bunnymate- Rename 
config/bunny.phptoconfig/_bunnymate.php 
Configuration
<?php
return [
    'pullingEnabled' => true,
    'pullZones' => [
        'default' => [
            'hostname' => 'https://awesome-project.b-cdn.net',
            'enabled' => true,
        ],
    ],
    'defaultPullZone' => 'default',
];
Usage
BunnyMate provides a global Twig function bunnyPullUrl(), which can be used to generate a Bunny CDN pullzone URL:
{% set bunnyUrl = bunnyPullUrl(asset) %}
{% set bunnyUrl = bunnyPullUrl(siteUrl('lorem/ipsim') %}
{% set bunnyUrl = bunnyPullUrl('lorem/ipsum') %}
{% set bunnyUrl = bunnyPullUrl('/lorem/ipsum', 'anotherZone') %}