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_railsPrerequisites
- Ruby with
bundlerinstalled - nvm
Usage
The gem ships with Rails generators under the frozen namespace. You can run them with:
bin/rails g frozen:GENERATOR_NAMEThe 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-
parklifewith 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-
esbuildandprecompiled_assets(Rails asset pipeline alternative) -
Unpoly(Hotwire alternative) -
water.css(CSS base theme) -
Jasmine(JS test runner) view_componentlookbook- 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.