diff --git a/blade.php b/blade.php index a26d29f..d1b7c79 100644 --- a/blade.php +++ b/blade.php @@ -3,7 +3,7 @@ /** * Kirby Blade Template * - * @version 1.0.0-beta + * @version 1.0.0 * @author Pedro Borges * @copyright Pedro Borges * @link https://github.com/pedroborges/kirby-blade-template diff --git a/changelog.md b/changelog.md index 869d916..4e9651d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,15 @@ # Change Log All notable changes to this project will be documented in this file. +## [1.0.0] - 2018-02-14 +### Added +- `blade.directives` option (@obelmont) + +### Changed +- Upgraded to Blade v5.6 + +### Fix +- Compiler `render` method + ## [1.0.0-beta] - 2017-03-03 ### Initial release diff --git a/package.json b/package.json index 8138020..5005cc0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "blade", "author": "Pedro Borges ", - "version": "1.0.0-beta", + "version": "1.0.0", "description": "Kirby Blade Template", "type": "kirby-plugin", "license": "MIT" diff --git a/readme.md b/readme.md index 37e06fd..7155789 100644 --- a/readme.md +++ b/readme.md @@ -8,45 +8,6 @@ Blade view files use the `.blade.php` file extension and are typically stored in **This component extends Kirby's built-in templating engine. Any regular `.php` template will continue to works as usual.** -## Requirements -- Kirby 2.3.2+ -- PHP 5.6.4+ - -## Installation - -### Download -[Download the files](https://github.com/pedroborges/kirby-blade-template/archive/master.zip) and place them inside `site/plugins/blade`. - -### Kirby CLI -Kirby's [command line interface](https://github.com/getkirby/cli) is the easiest way to install Blade Templates: - - $ kirby plugin:install pedroborges/kirby-blade-template - -To update it simply run: - - $ kirby plugin:update pedroborges/kirby-blade-template - -### Git Submodule -You can add Blade Templates as a Git submodule. - -
- Show Git Submodule instructions 👁

- - $ cd your/project/root - $ git submodule add https://github.com/pedroborges/kirby-blade-template.git site/plugins/blade - $ git submodule update --init --recursive - $ git commit -am "Add Blade Templates component" - -Updating is as easy as running a few commands. - - $ cd your/project/root - $ git submodule foreach git checkout master - $ git submodule foreach git pull - $ git commit -am "Update submodules" - $ git submodule update --init --recursive - -

- ## Basic Usage Blade Templates works out of the box without requiring any configuration. You just need to add `.blade.php` files to `site/templates`. @@ -174,10 +135,66 @@ Path to the `.blade.php` views, defaults to `site/templates`. ### `blade.cache` Path to views cache, defaults to `site/cache`. +### `blade.directives` +[Extends Blade](https://laravel.com/docs/master/blade#extending-blade) with custom directives. + +```php +c::set('blade.directives', [ + 'kirbytext' => function ($text) { + return ""; + } +]); +``` + +All directives registered with this option will be available in your Blade views: + +``` +@kirbytext('This is Kirby's special flavor of **markdown**.') +``` + +## Installation + +### Requirements +- Kirby 2.3.2+ +- PHP 5.6.4+ + +### Download +[Download the files](https://github.com/pedroborges/kirby-blade-template/archive/master.zip) and place them inside `site/plugins/blade`. + +### Kirby CLI +Kirby's [command line interface](https://github.com/getkirby/cli) is the easiest way to install Blade Templates: + + $ kirby plugin:install pedroborges/kirby-blade-template + +To update it simply run: + + $ kirby plugin:update pedroborges/kirby-blade-template + +### Git Submodule +You can add Blade Templates as a Git submodule. + +
+ Show Git Submodule instructions 👁

+ + $ cd your/project/root + $ git submodule add https://github.com/pedroborges/kirby-blade-template.git site/plugins/blade + $ git submodule update --init --recursive + $ git commit -am "Add Blade Templates component" + +Updating is as easy as running a few commands. + + $ cd your/project/root + $ git submodule foreach git checkout master + $ git submodule foreach git pull + $ git commit -am "Update submodules" + $ git submodule update --init --recursive + +

+ ## Change Log All notable changes to this project will be documented at: ## License Blade Template component is open-sourced software licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php). -Copyright © 2017 Pedro Borges +Copyright © 2018 Pedro Borges