Skip to content

Instantly share code, notes, and snippets.

@lukaskleinschmidt
lukaskleinschmidt / App.php
Created January 23, 2025 16:40
Kirby plugin priority
<?php
namespace App\Foundation;
use Kirby\Cms\App as BaseApp;
class App extends BaseApp
{
/**
* Custom plugin priority
@lukaskleinschmidt
lukaskleinschmidt / Menu.php
Last active March 1, 2024 15:57
Kirby 4 Panel Menu
<?php
namespace App;
use Closure;
use Kirby\Cms\App;
class Menu
{
public static array $pages = [];
@lukaskleinschmidt
lukaskleinschmidt / LICENSE.md
Last active February 13, 2026 07:36
Kirby 3 Synced Structure

MIT License

Copyright (c) 2023 Lukas Kleinschmidt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT

@rasteiner
rasteiner / release-plugin.php
Created October 5, 2022 12:43
kirby cli plugin version bump command
<?php
return [
'description' => 'Release a new version of your plugin',
'args' => [
'bump' => [
'description' => 'The type of version bump to perform',
],
],
'command' => static function ($cli): void {
@tkadlec
tkadlec / perf-diagnostics.css
Last active March 20, 2025 08:41
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@lukaskleinschmidt
lukaskleinschmidt / bootstrap.php
Created March 2, 2020 09:17
Kirby Thumbnails
<?php
// bootstrap/kirby.php
include dirname(__DIR__) . '/vendor/autoload.php';
$kirby = new Kirby([
'roots' => [
'base' => $base = dirname(__DIR__),
'index' => $base . '/public',
'content' => $base . '/content',
@iskrisis
iskrisis / Brewfile
Last active March 14, 2022 15:59
Brewfile cask dump
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
tap "nicoverbruggen/cask"
tap "shivammathur/php"
brew "btop"
brew "libssh2"
brew "freetds"
brew "libpq"
@lukaskleinschmidt
lukaskleinschmidt / app.scss
Last active September 30, 2025 21:18
Utility class generator like tailwindcss but in pure Sass.
@use 'sass:map';
@use 'variants' as * with (
$breakpoints: (
'small': 640px,
'medium': 768px,
'large': 1024px,
'wide': 1280px,
)
);
@lukaskleinschmidt
lukaskleinschmidt / Readme.md
Last active May 9, 2019 11:59
Kirby 3 uuid

You would need to install https://github.com/ramsey/uuid to make it work. Depending on the use case it could also make sense to implement those as traits.

<?php

class ArticlePage extends UuidPage
{
  
}

Simple Contact-Form in Kirby 3

As a starting point I've used the latest Starterkit (Beta 4) combined with the core from the latest Nightly Build (18-08-06).

First, set email-properties in your config. I would recommend using a mail-service like Mailgun (via SMTP) because setting everything up on your own server is cumbersome, error-prone, and unsecure. But of course, it's up to you.

site/config/config.php:

<?php