Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fork/kirby-starterkit

An essential Kirby CMS Starter Kit that offers a fast setup along with best practices.
https://github.com/fork/kirby-starterkit

alpine kirby php starter-kit vite

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# Kirby Starterkit

This project is a very basic but opinionated [Kirby](https://getkirby.com/) (v4) Starterkit using some established Kirby CMS Plugins. The folder structure is following the ["Public folder setup"](https://getkirby.com/docs/guide/configuration#custom-folder-setup__public-folder-setup) instructions from the Kirby Guide.

Frontend is based on [Vite](https://vitejs.dev/), [tailwindcss](https://tailwindcss.com/) and [Alpine.js](https://alpinejs.dev/).

It comes with is a development setup based on [Docker](https://www.docker.com/) including [Xdebug](#xdebug) and [Mailpit](#mailpit) as services, but you can choose to use your local environment instead.

![stage](https://github.com/fork/kirby-starterkit/assets/55244/cbb3ea0e-507f-473b-a5ca-368c407bd56f)

## Installation instructions

1. ### Setup Kirby via Docker
```bash
$ git clone [email protected]:fork/kirby-starterkit.git .
$ docker compose up -d
$ docker compose exec -it php composer install
```

2. ### Alternative: Setup Kirby via local environment

After installing the [essential requirements for Kirby](https://getkirby.com/docs/guide/quickstart) these instructions should be enough to get the project up and running on your local maschine.

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

3. ### 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.

```bash
$ yarn install
$ yarn build
```

4. ### Finalize Kirby Setup in the panel

Visit the admin panel at [http://localhost:8000/panel](http://localhost:8000/panel) and finalize the installation.

---

## Develop Frontend

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

```bash
$ 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](./docker-compose.yml) before installation. e.g.:

```bash
TIME_ZONE: "Europe/Berlin"
```

### Mailpit

There is a handy [Mailpit](https://mailpit.axllent.org/) service running and configured in the [localhost configuration](./site/config/config.localhost.php). 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](https://xdebug.org/docs/all_settings#mode) via environment variable when starting the setup.

```bash
$ XDEBUG_MODE=debug docker compose up -d
```

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

```bash
{
"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](https://getkirby.com/docs/cookbook/setup/kirby-meets-docker#example-4-docker-compose).

---

## Kirby Plugins used

- [Kirby Staticache Plugin](https://github.com/getkirby/staticache)
- [Retour for Kirby](https://github.com/distantnative/retour-for-kirby)
- [Kirby SEO](https://github.com/tobimori/kirby-seo)
- [Kirby Vite Plugin](https://github.com/arnoson/kirby-vite)

## License

This "Kirby Docker Starterkit" is licensed under the MIT License. Please see License File for more information. [Kirby](https://getkirby.com/) itself is [commercial software](https://getkirby.com/buy) and has its own [commercial license](https://getkirby.com/license).

---

Fork Logo

Brought to you by [Fork Unstable Media GmbH](https://www.fork.de)