Skip to content

πŸ₯³ Personal website built with Kirby CMS and designed by myself

License

Notifications You must be signed in to change notification settings

benjaminhaeberli/benjaminhaeberli.ch

Repository files navigation

Black and white photo of Benjamin Haeberli working on a computer.

Personal website built with Kirby CMS and designed by myself πŸ₯³

License GPL v3 GitHub Last Commit GitHub Language GitHub Stars Tests SSH deploy πŸš€

Getting started πŸ”Ž

Requirements

Installation

composer install
npm install
npm run watch
composer serve

More details on getkirby.com

Code quality

  • composer pint
  • composer test
  • composer fix:composer
  • npm run prettier

More details in composer.json and package.json

CI/CD πŸ§™β€β™‚οΈ

Powered by GitHub Actions

Deployment using FTP

The main.yml workflow in .github\workflows allow to deploy the theme using FTP. It upload only modified files and install PHP dependecies using composer install.

To use it, you need to configure those Action secrets :

Name Value (example)
SSH_HOST XXXX.ftp.infomaniak.com
SSH_USERNAME nice_username
SSH_PASSWORD very_strong_password
SSH_DIR sites/exports.nanou.ch/

An Deploy key needs to be created on the server, without passphrase :

cd ~/.ssh/
eval "$(ssh-agent -s)"
ssh-keygen -t ecdsa -b 521 -C "admin@benjaminhaeberli.ch"
ssh-add ~/.ssh/id_portfolio

And complete ./.ssh/known_hosts with GitHub's SSH key fingerprints

github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=

Be sure that PHP version (see Infomaniak docs) is the same as required in composer.json ⚠️

Config files ./.bashrc and .profile must also define the same PHP version :

export PATH=/opt/php8.1/bin:$PATH

Directory structure πŸ“

  • content/ - Content of the application (Kirby)
  • kirby/ - Kirby CMS code - Managed by Composer (Kirby)
  • media/ - Public images and thumbnails, plugin and panel assets - Managed by Kirby (Kirby)
  • public/ - Static images + processed assets generated by Vite (Vite)
  • resources/ - JavaScript and CSS files (sources)
  • site/ - Core of the application : templates, configuration, plugins and blueprints (Kirby)
  • src/ - Custom classes for the application (PHP)

Stack 🧠

Production

Kirby Plugins

Development

Documentation πŸ“’

  • GitMoji β†’ Emoji guide for GIT commit messages

Useful articles

This work is licensed under GNU Affero General Public License v3.0
Kirby CMS is proprietary and you need to buy a license to use it in production.
Others dependencies are under MIT, BSD-3-Clause and LGPL-2.1-only license.