承接 kirbycode/media-hub 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kirbycode/media-hub

最新稳定版本:v1.0.2

Composer 安装命令:

composer require kirbycode/media-hub

包简介

Centralized media library for Kirby CMS 5 — WordPress-style asset management with folder organisation, metadata, search, and a custom picker field.

README 文档

README

A centralized media library plugin for Kirby CMS 5 — WordPress-style asset management built directly into the Panel.

Kirby Media Hub — Panel overview

Kirby Media Hub — File metadata

Features

  • Dedicated Panel area — a full-screen Media Hub accessible from the Kirby sidebar
  • Folder organisation — create and delete subfolders to keep assets tidy
  • Drag-and-drop upload — upload files directly to any folder
  • Full-text search — searches filename, title, alt text, description, copyright, and photographer fields simultaneously
  • File metadata — edit title, alt text, description, copyright, photographer, and upload date per file
  • mediahubpicker field — a custom field type that lets any blueprint pick files from the Media Hub
  • UUID-based references — saved as file://uuid — identical format to Kirby's native files field
  • Works inside structure fields — the inline picker does not conflict with Kirby's dialog close handlers
  • Usage tracking — see every page that references a given file
  • Dashboard stats — total files, unused files, file-type breakdown, recent uploads, largest files
  • Auto-refresh stats — counters update immediately after upload or delete
  • No build step — pure PHP + Vue 3 template strings, drops straight into site/plugins/

Requirements

  • Kirby CMS 5.0 or higher
  • PHP 8.1 or higher

Installation

Composer (recommended)

composer require kirbycode/media-hub

Manual

  1. Download or clone this repository.
  2. Copy the media-hub-pro folder into your site's site/plugins/ directory.
  3. The plugin auto-creates content/media-hub/ on the first page load — no further setup needed.

Configuration

All options go in your site's config/config.php:

return [
    // Change the slug of the hub root page (default: 'media-hub').
    // Useful if your site already has a page at that slug.
    'kirbycode.media-hub.root-slug' => 'media-hub',
];

Blueprint Usage

Add the mediahubpicker field type to any page or file blueprint:

Single image picker

fields:
  hero_image:
    label: Hero Image
    type: mediahubpicker
    multiple: false
    accept: image

Multi-select gallery

fields:
  gallery:
    label: Gallery
    type: mediahubpicker
    multiple: true
    accept: image
    help: Pick images from the Media Hub

Document / PDF picker

fields:
  brochure:
    label: Download
    type: mediahubpicker
    multiple: false
    accept: document

Field options

Option Type Default Description
multiple bool true Allow selecting more than one file
accept string (all) Filter picker to a type: image, document, video, audio
label string Media Hub Files Panel field label
help string Help text shown below the field

What gets saved

The field writes a standard Kirby YAML list of file:// UUIDs to the content .txt file — the same format as Kirby's built-in files field:

Hero_image:

- file://abc123def456

Supported File Types

Category Extensions
Images jpg, jpeg, png, gif, webp, svg, avif
Documents pdf, doc, docx, xls, xlsx, ppt, pptx, txt
Video mp4, mov, webm, avi
Audio mp3, wav, ogg, m4a
Archives zip, gz, tar
Design ai, eps, psd

How It Works

The plugin registers a Kirby content page at content/media-hub/ (created automatically on first load). Subfolders are standard Kirby child pages. Files are stored using Kirby's native file system with .txt metadata sidecars.

The Panel area is a custom Kirby area with Vue 3 components (no build step — uses Kirby's bundled runtime). Ten REST API routes under /api/media-hub/ handle all operations.

Changelog

See CHANGELOG.md.

License

MIT — Shivlal Sheladiya

Credits

Built with Kirby CMS by kirbycode.com.

If this plugin saves you time, consider sponsoring further development.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固