This template is a scaffold for fully managed sites with Kirby CMS as the backend and modern lightweight clients leveraging Htmx and AlpineJs.
- β‘οΈ Uses Vite tooling with the kirby-vite plugin.
- π Live Reloading for Kirby templates, snippets, content, and more.
- π Kirby CMS Public folder structure.
- π₯° Htmx, AlpineJs, and TailwindCSS for HTML-driven development.
- π Fully managed site template including Kirby's flat-file DB engine.
- π Easy & instant Git-based deployment on a Dokku PaaS.
- π Optional Git-based CI, including Git-based production backups.
Before you begin, ensure you have the following prerequisites:
-
Clone this repository:
git clone https://github.com/your-username/your-repo.git cd your-repo npm install composer install
-
Configure any necessary environment variables or settings.
To start a local development server:
npm run dev
This command will start both the PHP server for Kirby CMS and the Vite development server. Ensure that the necessary ports (e.g., 8888) are open and not conflicting with other services.
Access the Kirby CMS admin panel at /panel
and the development site at http://localhost:8888
.
Run the build script and copy the content of this repository into the endpoint directory.
This repository provides a configured .htaccess file. Using Nginx or a different web server is possible but not recommended.
The site is designed to not loose any functionality with JavaScript disabled to offer strong backward compatibility and functionality with high-security clients (i.e., TOR Browser's highest security setting). To fully understand the security benefits and limitations of this template, research the involved technologies.
With the debug
setting disabled in the Kirby configuration, the site will set hardened security HTTP headers.
You can edit the headers in the header.php snippet.
It's further recommended to setup the path to the administration panel to something else than /panel
in the kirby configuration.
The recommended panel setup (3FA) would be:
Setup strong user permissions setup in the administration panel.
If you want to send emails from the site (e.g., from a form) it's recommended to setup a postfix SMTP server configured with loopback_only
and DANE
security level.
To configure kirby to send emails using the SMTP server, refer to the kirby dokumentation.
To deploy your application using Dokku, follow these general steps:
- Set up a Dokku instance and configure it.
- Add your Dokku server as a remote:
git remote add <remote-app-prod> dokku@your-server:<remote-app>
Deploy your application:
git push <remote-app-prod> prod
For more details on deploying with Dokku, refer to the Dokku documentation.
Feel free to open issues or pull requests for improvements, bug fixes, or new features.