Lean CMS sloth — a sloth reclining on a beanbag chair with a Ruby-stickered laptop

The Rails CMS
that gets out of the way.

Lean CMS is a Rails 8 engine for marketing sites. Editors hover over any page section to edit it in place. Developers wire content into their own ERB templates and stay in control of the design.

Rails 8 + SQLite MIT licensed Self-hosted, single binary
Why Lean CMS

Built for the dev who'd rather write Rails than wrestle WordPress.

Marketing sites are read-heavy and design-driven. Lean CMS optimizes for both — without taking your layout hostage or running its own database server.

In-context editing

Editors hover over any page section to reveal an Edit overlay. No back-and-forth between admin and live preview — the live page is the editor.

Your design, untouched

Lean CMS provides helpers to pull content into your ERB templates. It never injects a theme, never wraps your markup, never owns your layout.

SQLite-first

No database server to run, no add-on bill. A single file deployable with Kamal — production-ready for marketing sites at any reasonable scale.

In action

Hover. Edit. Done.

Editors don't context-switch into a separate admin to make a change. They click directly on the text, image, or section overlay — and a focused editor appears, right where the content lives.

Lean CMS in-context editing on the live page: hovering the hero subheading reveals floating Edit and Undo buttons next to the text, with a dashed outline showing the editable region
Hovering over the live page reveals inline Edit / Undo controls.
The Edit Text modal opened against the dimmed page: a textarea pre-populated with the current subheading, Cancel and Save buttons, with the surrounding page still visible behind
Clicking opens a focused edit modal. The page stays in view.
A taste

This is the whole API.

Drop helpers into your views. Logged-in editors get an overlay; visitors see plain, unwrapped HTML.

<%# A hover-editable section %>
<%= cms_editable_section(page: "home", section: "hero") do %>
  <section class="hero">
    <h1><%= editable_content("hero", "heading") %></h1>
    <p><%= editable_content("hero", "subhead") %></p>

    <% bg = page_content_image_url(@page, "hero", "bg") %>
    <% if bg %>
      <%= image_tag bg, class: "absolute inset-0" %>
    <% end %>
  </section>
<% end %>

<%# Optimized responsive image, gem-managed %>
<%= lean_cms_picture_tag "hero",
      alt: "Hero photo",
      widths: [640, 1280],
      sizes: "(min-width: 768px) 50vw, 100vw" %>

One layer of indirection. That's it.

Every helper does one obvious thing. You can read the source of every public method in five minutes.

  • cms_editable_section — wraps a block in a hover-edit overlay for admins
  • editable_content — inline-editable text fields
  • page_content_image_url — ActiveStorage image with optional variants
  • cards_section / bullets_section — list components admins can reorder
  • lean_cms_picture_tag — responsive <picture> with WebP+fallback
What you get

Everything a marketing site needs.
Nothing it doesn't.

Lean CMS admin Page Content editor — left sidebar nav, expanded Home page showing Hero Section, Statistics, Services Preview, and Call to Action with field counts and last-edited timestamps

9 content types

text, rich text, image, boolean, url, color, dropdown, cards, bullets.

Built-in auth

Login, password reset, magic-link invitations. Mounted at /lean-cms/login.

Version history

Every content change tracked via PaperTrail. One-click undo on inline edits.

Image optimizer

Rake task that emits WebP + JPG fallback variants at multiple widths.

Role-based access

Granular permission flags: pages, blog, users, settings. Plus super admin.

Content sync

Pull production content locally to stage changes; deploy via migrations.

Form submissions

Define forms in YAML; submissions land in the admin with email notifications.

YAML-defined structure

Declare pages, sections, fields in config/lean_cms_structure.yml; seed in one task.

Roadmap

From engine, to generator, to site builder.

Lean CMS today is a Rails engine you drop into an app. The plan is to grow into a full app generator and, eventually, a hosted site-builder service.

Today

Rails engine

In-context editing, auth, content types, image optimization in any Rails 8 app.

Next

App generator

lean_cms new my-site --structure=site.yml — full Rails app from a YAML spec.

Later

Hosted site builder

Intake form → AI-generated YAML → app generation → Kamal deploy to a fresh droplet.

Ready in five commands.

From bundle install to /lean-cms/login in under a minute.

$ bundle add lean_cms && rails generate lean_cms:install && rails db:migrate