multiplane/cockpit-cms-multiplane

Addon to add frontend logic to the headless Cockpit CMS v1

Installs: 11

Dependents: 1

Suggesters: 0

Security: 0

Type:cockpit-module

1.0.0-beta3 2023-11-23 11:58 UTC

This package is auto-updated.

Last update: 2024-11-24 20:38:03 UTC


README

This addon is currently in a rewrite stage. Information below may not be accurate.

Main part of Multiplane to add frontend logic to the headless Cockpit CMS v1.

This addon should be installed as part of the multiplane/multiplane repository. See installation instructions over there.

Features

TODO: cleanup/update

  • pages and sub pages (e. g. posts)
  • multilingual with language prefix, e. g.: example.com/en/my-page
  • 2 modes for structured content
    • one collection per content type, e. g. a collection named pages and a collection named posts
    • a single collection named pages - each entry has a type page or post (experimental)
  • maintenance mode with option for allowed ips
  • simple content preview while editing pages
  • two basic responsive themes with scss files
  • simple privacy notice banner, that gets enabled when clicking on video link
  • contact forms - fully functional without javascript
  • pre-rendering of markdown fields
  • multiple ways to change everything
  • full-text search
  • sitemap
  • atom feeds (experimental)
  • ...

Requirements

  • PHP >= 8.0
  • PDO + SQLite (or MongoDB - not tested)
  • GD extension
  • pecl intl extension (optional)
  • mod_rewrite, mod_versions enabled (on apache)

Make also sure that $_SERVER['DOCUMENT_ROOT'] exists and is set correctly.

Installation

This addon should be installed as part of the multiplane/multiplane repository. See installation instructions over there.

Installation as arbitrary cockpit addon (not recommended)

Copy this repository into /addons and name it Multiplane or use the cli.

via git

cd path/to/cockpit
git clone https://codeberg.org/multiplane/cockpit-cms-Multiplane.git addons/Multiplane

via cp cli

cd path/to/cockpit
./cp install/addon --name Multiplane --url https://codeberg.org/multiplane/cockpit-cms-Multiplane/archive/main.zip

via composer

Make sure, that the path to cockpit addons is defined in your projects' composer.json file.

{
    "name": "my/cockpit-project",
    "extra": {
        "installer-paths": {
            "addons/{$name}": ["type:cockpit-module"]
        }
    }
}
cd path/to/cockpit-root
composer create-project --ignore-platform-reqs raffaelj/cockpit .
composer config extra.installer-paths.addons/{\$name} "type:cockpit-module"

composer require --ignore-platform-reqs multiplane/cockpit-cms-multiplane

Config

Create a profile, name it my-profile and set multiplane to the profile name.

Example config/config.php:

return [
    'app.name' => 'My app',

    // define Multiplane config via profile
    'multiplane' => [
        'profile' => 'my-profile',
    ],

    // content i18n
    'i18n' => 'en',
    'languages' => [
        'default' => 'English',
        'de' => 'Deutsch',
    ],

    // app i18n
    'babel' => [
        'languages' => [
            'de' => 'Deutsch',
            'fr' => 'Francais',
        ],
    ],
];

Reserved routes

TODO: cleanup/update

  • /login - Calling example.com/login reroutes to the admin folder, e. g. example.com/cockpit
  • /search - full-text search
  • /getImage - Calling /getImage?src=assets_id?w=100&h=100&m=thumbnail returns images/thumbnails with predefined settings, that can be adjusted with params
  • /submit/form_name and /form/form_name - for forms
  • /clearcache to clear cockpit's cache (only in debug mode)

Copyright and License

Copyright 2019 Raffael Jesche under the MIT license.

See LICENSE for more information.

Credits and third party resources

Without Cockpit CMS, Multiplane couldn't exist. Thanks to Artur Heinze and to all contributors.