Skip to content

Commit

Permalink
Release 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroborges committed Feb 14, 2018
1 parent c511bdc commit ce2bd7e
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 42 deletions.
2 changes: 1 addition & 1 deletion blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Kirby Blade Template
*
* @version 1.0.0-beta
* @version 1.0.0
* @author Pedro Borges <oi@pedroborg.es>
* @copyright Pedro Borges <oi@pedroborg.es>
* @link https://github.com/pedroborges/kirby-blade-template
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "blade",
"author": "Pedro Borges <oi@pedroborg.es>",
"version": "1.0.0-beta",
"version": "1.0.0",
"description": "Kirby Blade Template",
"type": "kirby-plugin",
"license": "MIT"
Expand Down
97 changes: 57 additions & 40 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<details>
<summary><strong>Show Git Submodule instructions</strong> 👁</summary><p>

$ 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

</p></details>

## Basic Usage
Blade Templates works out of the box without requiring any configuration. You just need to add `.blade.php` files to `site/templates`.

Expand Down Expand Up @@ -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 "<?php echo kirbytext($text) ?>";
}
]);
```

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.

<details>
<summary><strong>Show Git Submodule instructions</strong> 👁</summary><p>

$ 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

</p></details>

## Change Log
All notable changes to this project will be documented at: <https://github.com/pedroborges/kirby-blade-template/blob/master/changelog.md>

## 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 <oi@pedroborg.es>
Copyright © 2018 Pedro Borges <oi@pedroborg.es>

0 comments on commit ce2bd7e

Please sign in to comment.