Bolt 4: the awesome CMS

Ivo Valchev
Sep 24 · 5 min read
Image for post
Image for post

Bolt CMS has been officially released this week, bringing fruit to a two-year-long journey of extensive development. During that time, we asked questions, we learnt from previous successes and mistakes, and we rolled up our sleeves and wrote code. The result? A content management system that’s easy for web designers & developers, yet simple and powerful for content editors.

Bolt’s promise to web developers: make CMS configuration easy-peasy!

Here’s 10 reasons why CMS configuration is so easy

  1. Built-in internationalisation
  2. Best rich content editors. For free
  3. 20 field types (+ dynamic collections of fields)
  4. Twig templates
  5. Out-of-the-box API: REST & GraphQL
  6. Extensions: get your hands dirty and customise Bolt further
  7. Fixtures (dummy content) to help you develop easier
  8. Easy deployment
  9. Friendly and supportive community (good morning to you ☕)

1. Powerful ContentTypes

What makes them so cool is how ridiculously easy it is to define them: all Content Types are defined in yaml format in the contenttypes.yaml file. Here’s an example:

pages:
name: Pages
singular_name: Page
title_format: [ heading, subheading ]
fields:
heading:
type: text
class: large
group: content
localize: true
subheading:
type: text
class: large
localize: true
slug:
type: slug
uses: [ heading ]
localize: true
photo:
type: image
label: "Image of workplace"
content:
type: html
allow_twig: true
localize: true
locales: ['en', 'nl', 'ja', 'nb']

By adding the pages content type to your configuration, Bolt will

  1. Include the content type to the Editor (admin area) of the website
  2. Allow editors to create, edit and delete pages
  3. Display all published pages on your website

Take a look yourself:

Image for post
Image for post
Page will be displayed at www.example.org/page/this-is-my-first-page-in-bolt-cms

2. Built-in internationalisation 🌐 🇩🇪 🇮🇸 🇧🇷

locales: ['en', 'nl', 'ja', 'nb']

By adding this one line to your content type, Bolt will make your pages translatable. The even cooler thing? You have field-level control over what is translated and what is not. For example, the page heading can be translated, whilst the photo will stay the same across languages.

Image for post
Image for post

Want to see which fields are translated across languages and which not? No problem. Bolt’s got you covered.

3. Best rich content editors. For free

Image for post
Image for post
Using Imperavi’s fantastic Article and Redactor. Free with Bolt.

4. 20 field types (+ dynamic collections of fields)

In addition, Bolt supports natively the following field types:

  1. Filelist & Imagelist: easy way to allow editors to attach multiple files and images.
  2. Collections: a grouping of fields. Adding dynamic number of fields is as easy as pressing a button in the Editor. For example, we can define a collection of members on our Team page and allow content editors to add multiple people with their name, image and position. Editors can add, delete, and re-order collection items with a click of a button!
  3. Templateselect: allow editors to select the Twig template that will be used to display the page. What is a Twig template? See right below!

5. Twig templates

Take a look how easy it is to generate the HTML for your pages:

{% extends 'partials/_master.twig' %}

{% block main %}
<div>
<h1>{{ record.heading }}</h1>
<h2>{{ record.subheading }}</h2>

{{ showimage(record.photo) }}

{{ record.content }}
</div>
{% endblock %}
Image for post
Image for post

6. Out-of-the-box API: REST & GraphQL

7. Extensions: get your hands dirty and customise Bolt further

Write your code and easily create a Bolt extension from it. Bolt automatically makes your extension autoloaded and autowired, and you’ll have all of Symfony’s services available. You can even have your extension depend on other Composer packages to pull them into your project.

To read more about extending Bolt, read the documentation and check the extensions that already exist to get started.

8. Fixtures (dummy content) to help you develop easier

bin/console doctrine:fixtures:load -n

9. Easy deployment 🚂🚃🚃

This means Bolt is easy to deploy in different environments. You can most likely keep using your preferred deployment and release strategy when you start working with Bolt. Whether you prefer using a tool like Deployer, a small bash script to git pull, Composer install or old-fashioned FTP. Bolt doesn’t enforce a specific workflow, but adapts to your preferences.

10. Friendly and supportive community (good morning to you ☕)

Ready to start building?

composer create-project bolt/project myfirstproject

Good luck building! 🛠⚙️

Bolt CMS

Sophisticated, Lightweight and Simple CMS written in PHP

Thanks to Maarten Dalmijn

Ivo Valchev

Written by

developer @TwoKings | aspiring product manager https://www.linkedin.com/in/valchevivo/

Bolt CMS

Bolt CMS

Sophisticated, Lightweight and Simple CMS written in PHP

Ivo Valchev

Written by

developer @TwoKings | aspiring product manager https://www.linkedin.com/in/valchevivo/

Bolt CMS

Bolt CMS

Sophisticated, Lightweight and Simple CMS written in PHP

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store