Skip to content

vagebnd/knapsack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version on Packagist Total Downloads

Vagebond Knapsack

This is a WordPress starter kit and can be used to kickstart your theme development.

1: Installation

composer create-project knapsack/knapsack your-theme-name

2: Adding templates

Knapsack uses the Knapsack router to map templates to views. Open up the routes/templates.php file and add your routes.

$router->template('my template name', function () {
    echo 'Hello world!'
});

You can also add a template with a view.

$router->template('my template name', function () {
    echo vgb_view('my-view');
});

But the most common way is to use a controller.

$router->template('my template name', [MyController::class, 'myMethod']);

Configuration

Knapsack works out of the box, but you can configure it to your needs. By default, the theme looks for a app.ts files in the resources/assets/ts/app.ts location. You can change this in the bootstrap/theme/assets.php file. (will be moved to config file)

The bootstrap/theme/settings.php contains the defaults for your Theme, like theme_support and other settings.

Blade

Vite

Development

Testing

[not yet implemented]

About

A modern WordPress starter theme

Resources

License

Stars

Watchers

Forks

Packages

No packages published