Skip to content

An essential Kirby CMS Starter Kit that offers a fast setup along with best practices.

License

Notifications You must be signed in to change notification settings

fork/kirby-starterkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirby Starterkit

This project is a very basic but opinionated Kirby (v4) Starterkit using some established Kirby CMS Plugins. The folder structure is following the "Public folder setup" instructions from the Kirby Guide.
Frontend is based on Vite, tailwindcss and Alpine.js.

It comes with is a development setup based on Docker including Xdebug and Mailpit as services, but you can choose to use your local environment instead.

stage

Installation instructions

  1. Setup Kirby via Docker

$ git clone [email protected]:fork/kirby-starterkit.git .
$ docker compose up -d
$ docker compose exec -it php composer install
  1. Alternative: Setup Kirby via local environment

After installing the essential requirements for Kirby these instructions should be enough to get the project up and running on your local maschine.

$ git clone [email protected]:fork/kirby-starterkit.git .
$ composer install
$ php -S localhost:8000 -t public kirby/router.php
  1. Build Frontend

The frontend build gets ignored by Git so you will have to run it initially. It is build directly to the Kirby public folder by the following command.

$ yarn install
$ yarn build
  1. Finalize Kirby Setup in the panel

Visit the admin panel at http://localhost:8000/panel and finalize the installation.


Develop Frontend

You could also just start developing Frontend components by starting Vite.

$ yarn dev

Additional features when using Docker

Configure Timezone in Docker service

To configure the Timezone of the PHP service you can change the build args of the compose file before installation. e.g.:

TIME_ZONE: "Europe/Berlin"

Mailpit

There is a handy Mailpit service running and configured in the localhost configuration. When starting the Docker setup, you can access Mailhog by navigating to http://localhost:8025/.

Xdebug

The PHP Service is configured with Xdebug. You can change the needed XDEBUG_MODE via environment variable when starting the setup.

$ XDEBUG_MODE=debug docker compose up -d

If you are working with Visual Studio Code you could use the following launch.json configuration.

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9003,
      "pathMappings": {
        "/var/www/html/": "${workspaceFolder}"
      }
    }
  ]
}

For more information on Docker basics related to Kirby you can find a very good guide in the Kirby Cookbook.


Kirby Plugins used

License

This "Kirby Docker Starterkit" is licensed under the MIT License. Please see License File for more information. Kirby itself is commercial software and has its own commercial license.


Fork Logo
Brought to you by Fork Unstable Media GmbH