This gist is an example of how to use a Makefile for working with Kirby CMS.
It exposes a few different tasks:
make dev
starts a dev server on localhost:9000, running Tailwind CSS and esbuild watcher processes in the background.make build
builds a set of minified production assetsmake deploy
runs a build and then usesrsync
to deploy to a remote server, defined by theDEPLOY_
variables at the topmake content
downloads content from the remote server, deleting any local files. This makes it easy to test against production data in your local environment.make kirby
upgrades Kirby to the latest version by fetching the new files from GitHubmake clean
removes any built files
The .deploy
file is a simple text file that we pass to rsync
to tell it which files and folders to sync. This helps avoid syncing sensitive or local data like the license file or user account information. You can add or remove lines as needed.