Modernized fork of locomotivecms/engine, kept up to date under dahogenelst together with Steam, Wagon, Coal, CustomFields and Common: Rails 8.1, Ruby 3.3+ (tested on 3.3 and 4.0), MongoDB 8, a Bootstrap 5 + Stimulus back-office. Alpha (5.0.0.alpha1): in development, not used in production yet. Not published on rubygems.org: use it from GitHub.
Locomotive is an open source platform to create, publish and edit sites (CMS). It is designed to save time and help you focus on what matters: front-end technology, standard development process and a very low learning curve for your clients.
Locomotive relies on a very original workflow:
- Sites are coded locally using our open source tool: Wagon.
- Sites are deployed to the platform (engine) thanks to our internal API.
- A back-office for the end-users is automatically generated based on the custom models and editable regions described by the developers.
Visit the Locomotive official website here for more information.
- Multi-sites natively supported
- Uses Liquid, a simple and clean templating language
- Easy to add custom sections, content types, no SQL needed
- Beautiful and intuitive editing interface
- Can fully localize all the content and pages
- Embed a Restful API to manage every site
- Develop and preview sites locally with your favorite tools (Wagon)
- Write the templates in Liquid or HAML, build the assets with the tools of your choice (Wagon)
A Rails 8.1 application, without Active Record:
rails new my_cms --skip-active-record --skip-javascript --skip-test --skip-system-test
cd my_cms
Add the gems to the Gemfile, from GitHub (they are not published on rubygems.org) and pinned to the tags of one release:
gem 'locomotivecms', github: 'dahogenelst/engine', tag: 'v5.0.0.alpha1'
gem 'locomotivecms_steam', github: 'dahogenelst/steam', tag: 'v2.0.0.alpha1'
gem 'custom_fields', github: 'dahogenelst/custom_fields', tag: 'v3.0.0.alpha1'
gem 'locomotivecms_common', github: 'dahogenelst/common', tag: 'v1.0.0.alpha1'
# the Rails 8 support of simple_token_authentication is not released yet
gem 'simple_token_authentication', github: 'gonzalo-bulnes/simple_token_authentication', ref: 'f1cba4e3e6'Use branch: 'master' on the four LocomotiveCMS gems to follow the development versions instead.
Then:
bundle install
bin/rails g mongoid:config # config/mongoid.yml: your MongoDB
bin/rails g locomotive:install # initializers, routes; removes public/index.html, robots.txt and 404.html (a site has its own)
bin/rails server
and create your account on http://localhost:3000/locomotive/sign_up. Sites are deployed with Wagon.
- Documentation
- Get help with Locomotive or discuss technical issues on Gitter or here.
- Follow us on twitter
Here is a list of the main gems used to power the Locomotive platform:
- Ruby 3.3+
- Rails 8.1 - web framework
- Bootstrap 5 and Stimulus - UI framework of the back-office; the page editor is written in React 19
- Liquid 5 - templates, rendered by Steam
- Mongoid 9 - Object-Document-Mapper for MongoDB 8
- Devise 5 - Authentication
- Carrierwave 3 - Upload
- Pundit 2 - Permissions
By default, the Locomotive back-office is fully translated in English, Dutch and Greek.
Adding a new language is pretty straightforward since we now manage all our I18n translation keys in Transifex, a platform dedicated to this kind of task.
Here is our Transifex portal page: https://www.transifex.com/locomotive/locomotive-engine. Feel free to sign up and translate!
Locomotive is an open source project, we encourage contributions. If you have found a bug and want to contribute a fix, or have a new feature you would like to add, follow the steps below to get your patch into the project:
- Install Ruby 3.3+, Node and Yarn (the back-office and editor bundles), Chrome (the system specs) and MongoDB 8, for instance
docker run -d -p 127.0.0.1:27017:27017 mongo:8.0 - Clone the project
git clone https://github.com/dahogenelst/engine.git - Setup a virtual host entry for
locomotive.localto point to localhost - Install the dependencies
bundle install && yarn install - Run the tests
bundle exec rspecandyarn test - Write your failing tests
- Make the tests pass
- Create a GitHub pull request
Feel free to contact me at didier at nocoffee dot fr.
Copyright (c) 2010-2024 NoCoffee, released under the MIT license
