Skip to content

Commit

Permalink
[TASK] Add some readme and a litte documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flemming-pr committed Aug 19, 2020
1 parent b9ac4cb commit fb62a41
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
28 changes: 28 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Installation

1. Install Classify from the `Tools > Addons` section of your control panel, or via composer:

```
composer require visuellverstehen/statamic-classify
```
## Configuration

After installation there will be a [classify.php](config/classify.php) file in the `config` folder.
To add or change stylesets simply add or change an array with classes that should be added to the HTML Tag.

## Usage

To apply the classes to the HTML Tags you have to pipe the content through the modifier.

If you don't give a special styleset the default styleset will be applied.
```
{{ text | classify }}
```

If you want to apply a special styleset wich is named `blog` you have to use the following.

```
{{ text | classify:blog }}
```

If you provide a styleset wich is not configured you will get the HTML Tag back without any changes.
5 changes: 4 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![Actions](https://github.com/visuellverstehen/statamic-classify/workflows/Tests/badge.svg)](https://github.com/visuellverstehen/statamic-classify/actions)
[![Downloads](https://img.shields.io/packagist/dt/visuellverstehen/statamic-classify.svg)](https://packagist.org/packages/visuellverstehen/statamic-classify)

# Statamic-Classify

This addon lets you easily create sylesets which you can then apply to HTML tags coming from the Bard Editor.

## [Documentation](DOCUMENTATION.md)
6 changes: 6 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
|--------------------------------------------------------------------------
|
| Here you can define different style collections.
| To add a new styleset you have to add a new array like the 'blog' array.
|
*/

Expand All @@ -16,4 +17,9 @@
'a' => 'link',
'p' => 'paragraph',
],

// 'blog' => [
// 'button' => 'button button--blue',
// 'a' => 'link',
// ],
];

0 comments on commit fb62a41

Please sign in to comment.