0.0
The project is in a healthy, maintained state
Generators for turning Rails into an SSG
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 8.1
 Project Readme

Gem Version Build

Frozen Rails

This repo automates the instructions from rails-static.com and a lot of additional setup which was created by me.

Running the full setup bin/rails g frozen:rails turns a fresh Rails application into a full static site generator that supports Markdown AND structured data (SQLite). The SSG is very developer-focused and might be cumbersome to use for non-devs.

Installation

bundle add frozen_rails

Prerequisites

  • Ruby with bundler installed
  • nvm

Usage

The gem ships with Rails generators under the frozen namespace. You can run them with:

bin/rails g frozen:GENERATOR_NAME

The following generators are available:

Generator Functionality
frozen:rails Runs frozen:md, frozen:ssg, frozen:db and frozen:ui
frozen:md Sets up Markdown processing similar to rails-static.com
frozen:ssg Sets up deploying to GitHub & GitLab pages, similar to rails-static.com
frozen:db Sets up static_db, avo, friendly_id and fully customizes bin/rails g scaffold
frozen:ui Sets up view_component, lookbook, esbuild, unpoly, jasmine and fully customizes bin/rails g component

More details

bin/rails g frozen:md
  • decant (picks up Markdown files and provides a nice interface)
  • kramdown (Markdown processing) with ERB interpolation
  • rouge (syntax highlighting for Markdown code blocks)
  • Routes for pages and categories.

bin/rails g frozen:ssg
  • parklife with ActiveStorage config (crawls rack apps and emits a static site)
  • GitHub pages deployment
  • GitLab pages deployment

bin/rails g frozen:db
  • static_db (SQLite <-> YAML converter)
  • sqlite_extensions-uuid (SQLite UUID support to avoid YAML merge conflicts)
  • friendly_id (for prettier URLs)
  • avo (a full admin panel)
  • Adjusts bin/rails g scaffold

bin/rails g frozen:ui
  • esbuild and precompiled_assets (Rails asset pipeline alternative)
  • Unpoly (Hotwire alternative)
  • water.css (CSS base theme)
  • Jasmine (JS test runner)
  • view_component
  • lookbook
  • Adjusts bin/rails g component

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dunkelziffer/frozen_rails.

License

The gem is available as open source under the terms of the MIT License.