Bolt 4: the awesome CMS

Ivo Valchev
Sep 24, 2020 · 5 min read

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. Powerful ContentTypes

Bolt structures all content in ContentTypes: a content type defines the structure of your website content, for instance News, Pages, Blog Posts, Testimonials and Sections are all examples of a ContentType.

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

Take a look yourself:

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

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

Did you notice the following configuration from the example above:

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.

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

Redactor & Article: the _best_ rich text editors, fully licensed for use in Bolt itself. For free.
Why? Because we believe editing content should be easy. You, as a content editor, should be provided with as much freedom as possible to adapt your pages yourself. No technical knowledge required. Have a campaign? Drag, embed and play with the content. Add content blocks you need. Life can be so simple.

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

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

By default, the CMS comes with all the standard field types you’d expect, e.g.: text, date, file, image, markdown, select and others.

In addition, Bolt supports natively the following field types:

5. Twig templates

The flexible, fast and secure templating language Twig is the de-facto standard across the Symfony community and beyond. At the core of it is simplicity and security.

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 %}

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

Without any additional configuration, Bolt provides a RESTful and GraphQL API, allowing you to use the CMS in headless mode, alongside a static site generator, or simply to feed data into whatever other platform that wants to listen to it.

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

Getting a little more technical here, but… the beauty of Bolt being a Composer package is how easy it is to extend it. There’s literally no limits to what functionality you can add to Bolt, or on top of Bolt, as an extension.

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

Loading test content during development, or when deploying to showcase your work, is tiresome. But it needn’t be. Once you have your content types set up, it is as easy as running this one line of code to prepopulate your CMS with dummy data:

bin/console doctrine:fixtures:load -n

9. Easy deployment 🚂🚃🚃

At its core, Bolt is a Composer package. In addition, all of Bolt’s (and Symfony’s) configuration is stored in its YAML configuration files.

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 ☕)

Best of all is our open source community: our Slack community has over 1,600 members doing the same thing as you do: building awesome websites. The community is a great place to get to know like-minded people as well as get some help when needed. Head over to the community now and say hi :-)

Ready to start building?

If you’re ready to try this out, go over to the Bolt CMS website or start your first project by running:

composer create-project bolt/project myfirstproject

Good luck building! 🛠⚙️

Bolt CMS

Sophisticated, Lightweight and Simple CMS written in PHP