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 version.
gem "maglevcms", "~> 3.0.0"- 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
Section picker thumbnails
- The legacy theme admin Take Screenshot flow is not part of Maglev v3. Thumbnails are still JPEG files under
public/theme/<category>/<section_id>.jpg; see Section thumbnail.
- The legacy theme admin Take Screenshot flow is not part of Maglev v3. Thumbnails are still JPEG files under
From v1 to v2
Nothing to do.
From v1.0.x to v1.1.x
Your theme layout must include an extra JavaScript tag in the <head>.
That script handles communication between themed pages and the Maglev editor (live preview).
<!DOCTYPE html>
<html>
<head>
<title><%= maglev_page.seo_title.presence || maglev_site.name %></title>
....
<%= maglev_live_preview_client_javascript_tag %>
....