Skip to content

stuymedova/kirby-headless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirby as a Headless CMS

For instructions on how to get started with Kirby, see getkirby.com/docs/guide/quickstart.
For KQL Plugin documentation, see github.com/getkirby/kql.

Overview

.
└── site
    ├── blueprints
    │   └── users
    │       ├── api.yml
    │       └── default.yml
    ├── config
    │   └── config.php
    └── plugins
        └── kql

Prerequisites

PHP and Composer

Replicate

Assuming the official Plainkit or Starterkit as a starting point.

  1. Install Kirby dependencies: composer install.
  2. Install the KQL plugin: composer require getkirby/kql.
  3. Set up authentication:
  • Create an API user and set user permissions in /site/blueprints/users. For more information, see documentation on roles and permissions.
  • Set up Basic Auth. Modify /site/config/config.php:
return [
  'api' => [
    'basicAuth' => true,
    'allowInsecure' => true # TODO: remove pre-production
  ]
];
  1. Startup a local PHP server: composer start (or use an alternative: Laravel Valet/MAMP/…).
  2. Go to the Panel ({url}/panel) and create an API user. Further, use these credentials to authorize requests to your API.

Quick Setup

  1. Clone/download this repository.
  2. Run in terminal:
composer install
composer start
  1. Implement step 5 above.

Potentially useful tools

Insomnia (testing)

About

[SETUP] Kirby as a Headless CMS (Kirby + KQL)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages