Frozen Rails
DISCLAIMER: I generated this repo with AI and haven't tested it yet. I will verify manually verify the functionality and use AI to generate a test suite as soon as I get to it. Until then, use at your own risk.
This repo automates the instructions from rails-static.com and some additional setup which was created by me.
Running the full setup bin/rails g frozen:rails should turn 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
Adding to a gem:
# my-cool-gem.gemspec
Gem::Specification.new do |spec|
# ...
spec.add_dependency "frozen_rails"
# ...
endOr adding to your project:
# Gemfile
gem "frozen_rails"Supported Ruby versions
- Ruby (MRI) >= 2.7.0
- JRuby >= 9.3.0
Usage
The gem ships with Rails generators under the frozen namespace. After including frozen_rails in your Rails application the following generators will be available:
# ✅ passes, ✅ works correctly, ❌ has test suite
# - Adds `decant` with a custom extension.
# - Adds `kramdown`, `rouge` and ERB interpolation for `.md` files.
# - Adds application scaffold.
bin/rails g frozen:md
# - Prompts for a rouge theme. Pass `--rouge_theme=name` to run non-interactive.# ✅ passes, ✅ works correctly, ❌ has test suite
# - Adds `parklife`
# - Adds `.gitlab-ci.yml` and tweaks parklife config.
bin/rails g frozen:ssg# ✅ passes, ✅ works correctly, ❌ has test suite
# - Adds `sqlite_extensions-uuid`
# - Adds `static_db`
# - Adds `friendly_id`
# - Adds `avo`
# - Adjusts Rails scaffold generator and migration generator to be more helpful
bin/rails g frozen:db# ✅ passes, ❓ works correctly, ❌ has test suite
# - SEO helpers
# - sitemap/robots skeleton
bin/rails g frozen:seo# FUTURE: frozen:erb
# - view_component
# - herb
# - lookbook# ✅ passes, ❓ works correctly, ❌ has test suite
# - water.css
# - sample importmap pin
# - Hotwire Spark & Action Cable configuration
# - Stimulus hotkey controller
bin/rails g frozen:ui# ✅ passes, ❓ works correctly, ❌ has test suite
# Full Rails setup (runs all frozen generators in order)
bin/rails g frozen:rails# FUTURE: frozen:meetupContributing
Bug reports and pull requests are welcome on GitHub at https://github.com/dunkelziffer/frozen_rails.
Credits
This gem is generated via newgem template by @palkan.
License
The gem is available as open source under the terms of the MIT License.