Skip to content

Commit

Permalink
adding default config for layout extension closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Howard committed Sep 14, 2016
1 parent db4067b commit 874deb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ In other words, just put your Pug files in the regular views directory and name
The Pug view files can work side-by-side with regular PHP views. To use Blade templating within your Pug, just name the files with ".pug.blade" or ".pug.blade.php" extensions.


## Extending Layouts

Layout extension requires a leading slash for the view name, where `extends /layouts/main` would parse `resources/views/layouts/main.(pug|jade)`. The `basedir` option is required and defaults to `resources/views`.


## Histoy

Expand Down
3 changes: 3 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* https://github.com/pug-php/pug/blob/master/src/Jade/Jade.php
*/

// Required for extending layouts
'basedir' => resource_path('views')

// 'cache' => null,
// 'stream' => null,
// 'extension' => array('.pug', '.jade'),
Expand Down

0 comments on commit 874deb5

Please sign in to comment.