riclep/laravel-storyblok-typography

A bunch of typographical helpers and features for Laravel Storyblok

1.0.1 2022-12-01 11:59 UTC

README

Latest Version on Packagist Total Downloads GitHub Actions

Make your content sing with enhanced typography thanks to PHP Typography. The package includes a trait making it simple to apply typographic fixes such as proper quotes '' -> ‘’, small caps and useful class names for styling numbers etc.

This package is a module for Laravel Storyblok

Installation

You can install the package via composer:

composer require riclep/laravel-storyblok-typography

Usage

It’s really simple to use, just add the trait to any Blocks you want to apply typography to. Create an $applyTypography property containing an array of fields. It will work for text and html content and has sensible defaults but you can override the settings on a Block by Block basis.

<?php

namespace App\Storyblok;


use Riclep\Storyblok\Block as BaseBlock;
use Riclep\StoryblokTypography\Traits\AppliesTypography;

class Block extends BaseBlock
{
	use AppliesTypography;

	protected $applyTypography = ['Text', 'Html'];
}

Read the docs for more.

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.