This repository contains some simple Bear CMS applications, that will help you learn to code for Bear CMS. You can download the whole repo as a ZIP archive and extract it locally. To run it you will need a web server (NGINX or Apache) and PHP version 7.1 (or higher).
- Get an application secret key from bearcms.com. Learn more.
- Update the
BEARCMS_APP_SECRET_KEY
constant located atpath-to-the-demo/public/index.php
- Run
composer install
in the demo directory (path-to-the-demo/
). - Open
http://localhost/path-to-the-demo/public/index.php
in your browser. Every demo application comes with an administrator user already set up so you can log in by openinghttp://localhost/path-to-the-demo/public/index.php/admin
and using the email[email protected]
and the password123456
.
In every demo, you will find a couple of directories.
- The
public
directory is the place you must point your browser to run the application. Here theindex.php
file just initializes the demo. Nothing interesting here. - The
data
directory stores the application data. Boring. - The
app
directory is the most interesting one. This is the place where the specific demo code is located. Everything starts with theapp/index.php
file, so be sure to check here first. Comments on almost every line will help you along the way.
This demo will teach you how to create your own Bear CMS theme. More information is available at https://bearcms.com/support/make-a-theme/
The website administrators will use the CMS UI to manage pages, text, images, blog posts, etc. You as developer can access the data they've created to build something more complex. More information is available at https://bearcms.com/support/access-the-data/
Bear CMS provides custom HTML elements (that are processed to valid HTML tags on the server) that you can use to define the content structure of a page. For example, you can specify an image (and set its default value) and later administrators can change it. More information is available at https://bearcms.com/support/use-custom-elements/
The official Bear CMS support articles are available at https://bearcms.com/support/. We recommend checking them out to learn more about the Bear CMS project.
This demos are created and maintained by the Bear CMS team. Feel free to contact us at [email protected] and bearcms.com.