定制 vaersaagod/bunnymate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vaersaagod/bunnymate

最新稳定版本:2.0.0

Composer 安装命令:

composer require vaersaagod/bunnymate

包简介

Keeping your bunny finely-tuned for a hoppy life, mate!

README 文档

README

Keeping your bunny finely-tuned for a hoppy life, mate!

Logo

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

  1. ddev craft plugin/uninstall bunny && ddev composer remove vaersaagod/bunny
  2. ddev composer require vaersaagod/bunnymate && ddev craft plugin/install _bunnymate
  3. Rename config/bunny.php to config/_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') %}

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-06