Skip to content

5. Theming

Ryan Winchester edited this page Mar 15, 2016 · 4 revisions

Installing a theme

Installing a theme using the packagist name (e.g. vendor/theme):

php artisan flashtag:install-theme vendor/theme

Making a theme

A) Starting From Scratch

To make your own theme from scratch id pretty simple.

1. Make a composer package

Add theme.php

<?php

return [

    'name' => 'clean-creative',

    'version' => '0.0.1',

    'views' => __DIR__.'/views',

    'assets' => __DIR__.'/assets',

];

2. Create your views

required blade views variables available
home
posts.index Collection $posts
posts.show Post $post
posts.category Category $category, Collection $posts
posts.tag Tag $tag, Collection $posts
posts.author Author $author, Collection $posts
pages.default-page Page $page

B) Forking

Fork and edit the example repo.

Make sure you edit theme.php and composer.json!

Make a packagist package out of it.

Clone this wiki locally