No release in over 3 years
RailsPress provides drop-in blog functionality with categories, tags, rich text editing, and an admin interface.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.1.23.beta
>= 8.0
 Project Readme

RailsPress

A simple blog engine for Rails 8 applications.

Features

  • Blog posts with rich text editing (Lexxy editor)
  • Markdown Mode - Toggle between rich text and markdown editing
  • Categories and tags
  • SEO metadata (meta title, meta description)
  • Draft/published workflow with automatic publish timestamps
  • Admin interface for content management
  • Focal Points - Set image focal points for smart cropping across different aspect ratios (docs)
  • Entity System - Manage any ActiveRecord model through the admin (docs)
  • Import/Export - Bulk markdown operations with YAML frontmatter (docs)
  • Theming - CSS variable customization (docs)

Requirements

  • Rails 8.0+
  • Ruby 3.3+
  • ActionText (for rich text)
  • Active Storage (for image uploads)

Installation

Prerequisites

Ensure ActionText and Active Storage are installed in your application:

rails action_text:install
rails active_storage:install
rails db:migrate

Install RailsPress

Add to your Gemfile:

gem "railspress"

Run the install generator (recommended):

bundle install
rails generate railspress:install
rails db:migrate

Or manually copy migrations:

bundle install
rails railspress:install:migrations
rails db:migrate

Mount the engine in your routes:

# config/routes.rb
Rails.application.routes.draw do
  mount Railspress::Engine => "/blog", as: :railspress
end

Authentication

Important: The admin interface is publicly accessible by default. You must configure authentication before deploying to production.

Add authentication to your application controller:

# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
  before_action :authenticate_user!, if: :railspress_admin?

  private

  def railspress_admin?
    request.path.start_with?("/blog/admin")
  end
end

See CONFIGURING.md for more authentication patterns.

Usage

Access the admin interface at /blog/admin.

From there you can:

  • Create and manage blog posts with rich text content
  • Organize posts with categories
  • Tag posts (enter tags as comma-separated values)
  • Save posts as drafts or publish them

Generators

# Full installation (migrations, importmap, routes)
rails generate railspress:install

# Add a custom entity (managed through admin)
rails generate railspress:entity Project title:string description:text content:rich_text

Documentation

Development

After checking out the repo:

bundle install
cd spec/dummy && bundle exec rails db:migrate && cd ../..
bundle exec rspec

License

The gem is available as open source under the terms of the O'Saasy License.

Trademarks

The Rails trademarks are the intellectual property of David Heinemeier Hansson, and exclusively licensed to the Rails Foundation. Uses of "Rails" and "Ruby on Rails" in this project are for identification purposes only and do not imply an endorsement by or affiliation with Rails, the trademark owner, or the Rails Foundation.