medienbaecker / kirby-playground
Kirby Playground
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 0
Type:kirby-plugin
Requires
README
Usage
- Create your tests as snippets in
/site/snippets/playground/
- Access your tests at
/playground/[component-name]
For example, if you have a snippet named buttons.php
, it will be available at /playground/buttons
.
Features
- Custom route handling for
/playground/(:any?)
- Site method
playgroundLinks()
that scans the playground snippets directory and creates a navigation list - Components are rendered through virtual pages, without requiring actual page files
- Loads CSS files from
assets/css/playground/[component-name].css
and a globalplayground.css
- Built-in fallback to a component list when accessing non-existent components
Configuration
You can enable authentication to restrict access to logged-in Panel users:
// site/config/config.php return [ 'medienbaecker.playground.auth' => true ];
Directory Structure
assets/
├── css/
│ └── playground/
│ ├── playground.css
│ └── your-component.css
site/
├── snippets/
│ └── playground/
│ └── your-component.php