riclep/laravel-storyblok-previews 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

riclep/laravel-storyblok-previews

最新稳定版本:0.0.7

Composer 安装命令:

composer require riclep/laravel-storyblok-previews

包简介

Artisan command for creating component preview images for Storyblok

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions

Artisan commands for working with the Storyblok API in Laravel.

Installation

You can install the package via composer:

composer require riclep/laravel-storyblok-previews

Make sure you publish the config file with the following command:

php artisan vendor:publish --provider="Riclep\StoryblokPreviews\StoryblokPreviewsServiceProvider" --tag="config"

Please ensure you have configured the Laravel Storyblok or Laravel Storyblok CLI package before using this package.

You will also need to set up Sidecar Browsershot.

If you would like to use a different screenshot driver, feel free to submit a PR.

Usage

This is a package you may wish you install outside of your main project and use it simply to generate screenshots of your Storyblok components for various websites or projects but adjust the configuration to suit your needs.

To specify the components you would like to generate screenshots for modify your storyblok-previews.php config file.

Each component will need an entry in the components item. The item’s key should match the component name in Storyblok. Each component should have a selector to target the component in the HTML. Optionally, you can specify a filename for the screenshot, a URL to navigate to and a delay in milliseconds to wait before taking the screenshot. If you leave the filename empty, the component name will be used. If you don't specify a URL it will try and find a published page in Storyblok that contains the component.

Example:

    [
        'hero' => [
            'selector' => '.hero',
        ],
        'grid' => [
            'delay' => 500,
            'filename' => 'grid.jpg',
            'selector' => ':has(> .grid),
            'url' => '/about',
        ],
    ];

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ric@sirric.co.uk instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-07