Guides
Upgrades
From v2 to v3
Maglev v3 drops the Node.js toolchain thanks to Hotwire, Stimulus, and Rails import maps. You can manage the entire frontend from Ruby and the asset pipeline.
Follow these steps to upgrade an existing Maglev v2 installation to v3 beta:
Update dependencies
- Update the
maglevcmsentry in your application'sGemfileby pointing to the 3.0.0.beta2 version.
gem "maglevcms", "~> 3.0.0.beta2"- Update the
- Run
bundle installto install the new version.
Install the new migrations
- Execute
bundle exec rails maglev:install:migrationsin your main app.
- Execute
Run the migrations
- Apply them with
bundle exec rails db:migrate.
- Apply them with
Publish existing pages
- Maglev v3 only renders pages that are published. Publish the whole site once:
bundle exec rails maglev:publish_siteUpdate any custom editor header
- If you override the editor header, move
app/views/maglev/editor/_header.html.erbtoapp/views/layouts/maglev/editor/_head.html.erb.
- If you override the editor header, move
From v1 to v2
Nothing to do.
From v1.0.x to v1.1.x
The layout of your theme must now include an additional Javascript file in the HTML header.
This file is in charge of the communication between any page of the theme and the Maglev Editor UI.
<!DOCTYPE html>
<html>
<head>
<title><%= maglev_page.seo_title.presence || maglev_site.name %></title>
....
<%= maglev_live_preview_client_javascript_tag %>
....