Skip to content

Commit

Permalink
Merge pull request #43 from fork/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jeslage authored Jan 15, 2024
2 parents 80b8be5 + 9a51f6b commit 2ea4865
Show file tree
Hide file tree
Showing 50 changed files with 1,097 additions and 1,559 deletions.
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ insert_final_newline = true
indent_size = 4
trim_trailing_whitespace = false

[site/templates/**.php]
indent_size = 2

[site/snippets/**.php]
[*.php]
indent_size = 2

[package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}]
Expand Down
43 changes: 0 additions & 43 deletions .githooks/commit-msg

This file was deleted.

33 changes: 0 additions & 33 deletions .githooks/pre-commit

This file was deleted.

14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Install Composer dependencies
run: composer install
- name: Run PHPStan
Expand All @@ -24,10 +29,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v3
with:
# Fetch the last 2 commits instead of just 1. (Fetching just 1 commit would overwrite the whole history)
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Install Composer dependencies
run: composer install
- name: Run php-cs-fixer
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pnpm-lock.yaml
/vendor
/kirby
/site/plugins/*
/site/config/vite.config.php
/site/config/retour.yml

# Editors
# (sensitive workspace files)
Expand Down Expand Up @@ -47,10 +49,10 @@ dist
!public/assets/dist
.dev
content/home/.lock
.vite

# CS Fixer
# --------
.php-cs-fixer.cache
site/logs/retour
cghooks.lock

29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Kirby Starterkit

This project is a very basic but opinionated [Kirby](https://getkirby.com/) (v3.9) 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.<br>
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.<br>
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 [MailHog](#mailhog) as services, but you can choose to use your local environment instead.
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

### Setup Kirby via Docker

1. ### Setup Kirby via Docker
```bash
$ git clone git@github.com:fork/kirby-starterkit.git .
$ docker compose up -d
$ docker compose exec -it php composer install
```

### Alternative setup Kirby via local environment
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.

Expand All @@ -27,7 +26,7 @@ $ composer install
$ php -S localhost:8000 -t public kirby/router.php
```

### Build Frontend
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.
Expand All @@ -37,10 +36,12 @@ $ yarn install
$ yarn build
```

### Finalize Kirby Setup in the panel
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.
Expand All @@ -49,6 +50,8 @@ You could also just start developing Frontend components by starting Vite.
$ yarn dev
```

---

## Additional features when using Docker

### Configure Timezone in Docker service
Expand All @@ -59,9 +62,9 @@ To configure the Timezone of the PHP service you can change the build args of th
TIME_ZONE: "Europe/Berlin"
```

### MailHog
### Mailpit

There is a handy [MailHog](https://github.com/mailhog/MailHog) 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/.
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

Expand Down Expand Up @@ -93,16 +96,14 @@ If you are working with Visual Studio Code you could use the following launch.js

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 3 Content Security Policy Header](https://github.com/bnomei/kirby3-security-headers)
- [Kirby Staticache Plugin](https://github.com/getkirby/staticache)
- [Retour for Kirby](https://github.com/distantnative/retour-for-kirby)
- [Meta Knight – SEO for Kirby](https://github.com/diesdasdigital/kirby-meta-knight)
- [Kirby Navigation Field](https://github.com/chrisbeluga/kirby-navigation)
- [Kirby SEO](https://github.com/tobimori/kirby-seo)
- [Kirby Vite Plugin](https://github.com/arnoson/kirby-vite)
- [Kirby Fields Block](https://github.com/jongacnik/kirby-fields-block)
- [Kirby 3 Extended Writer](https://github.com/coralic/kirby-extended-writer)

## License

Expand Down
51 changes: 21 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
{
"name": "fork/kirby-starterkit",
"description": "Kirby Starterkit",
"homepage": "https://fork.de",
"type": "project",
"keywords": [
"kirby",
"cms",
"starterkit"
],
"authors": [
{
"name": "Fork Unstable Media GmbH",
"homepage": "https://fork.de"
}
],
"require": {
"getkirby/cms": "^3.9.4",
"bnomei/kirby3-security-headers": "^2.5.4",
"getkirby/staticache": "^1.0.1",
"distantnative/retour-for-kirby": "^4.4.2",
"diesdasdigital/kirby-meta-knight": "^1.2.2",
"belugadigital/kirby-navigation": "^3.0.1",
"arnoson/kirby-vite": "^3.0.7",
"jg/kirby-fields-block": "^1.2.1",
"coralic/kirby-extended-writer": "^1.1.1",
"medienbaecker/autoresize": "^2.1.4"
"getkirby/cms": "^4.0",
"getkirby/staticache": "^1.0",
"arnoson/kirby-vite": "^5.0",
"tobimori/kirby-seo": "^0.4",
"distantnative/retour-for-kirby": "^5.0"
},
"config": {
"optimize-autoloader": true,
Expand All @@ -19,25 +29,6 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.17",
"phpstan/phpstan": "^1.10.15",
"brainmaestro/composer-git-hooks": "v3.0.0-alpha.1"
},
"scripts": {
"post-install-cmd": [
"./vendor/bin/cghooks add --ignore-lock"
],
"post-update-cmd": [
"./vendor/bin/cghooks update"
]
},
"extra": {
"hooks": {
"pre-commit": [
"./.githooks/pre-commit"
],
"commit-msg": [
"./.githooks/commit-msg"
]
}
"phpstan/phpstan": "^1.10.15"
}
}
Loading

0 comments on commit 2ea4865

Please sign in to comment.