定制 visionbites/kirby-atai 二次开发

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

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

visionbites/kirby-atai

Composer 安装命令:

composer require visionbites/kirby-atai

包简介

A Kirby field plugin to generate alternative text for images using alttext.ai

README 文档

README

A Kirby field plugin to generate alternative text for images using alttext.ai.

Requirements

Install

Composer

composer require visionbites/kirby-atai

Download Zip file

Copy plugin folder into site/plugins

Usage

Add a field atai to your blueprint where you want to enter the alternative text.

File blueprint

When used on a file view, the field automatically detects the current file:

fields:
  alt:
    type: atai
    label: Alternative text

Page blueprint

On a page view, use the target option to specify which files field holds the image:

fields:
  image:
    type: files
    max: 1
  alt:
    type: atai
    label: Alternative text
    target: image

Field properties

Property Type Default Description
label string Field label shown in the Panel
target string image Name of the files field to read the image from (page view only)

Options

Set the options in config.php:

return [
  'visionbites.kirby-atai' => [
    'api_key'      => 'XXX',
    'reference'    => 'my-project',
    'is_reachable' => false,
  ]
];
Option Type Default Description
api_key string null Your API key for alttext.ai (required)
reference string null A reference sent to alttext.ai with the metadata, e.g. to track usage
is_reachable bool false If true, only the image URL is sent to alttext.ai. If false, the full image is sent as base64-encoded data.

Development

npm run dev    # watch mode (kirbyup)
npm run build  # compile for production
npm run lint   # lint with standard

Todos

  • Add option to pass tags
  • Add option to pass manufacturer and product data
  • Implement an option to batch process images
  • Implement an info section to get usage information

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固