Rails Static
Generate static sites with Rails · a step by step guide
Another framework?
The Ruby ecosystem offers many static site generators - Jekyll, Middleman, Kamal Skiff, Sitepress, Bridgetown, High Voltage, Nanoc, … - and countless more exist beyond Ruby.
The intent here is to remove one - to use Rails and all its magic goodies for both dynamic and static sites.
This is not a new framework. It’s a thoughtful collection of existing gems that each excel at one task and integrate seamlessly with Rails.
This very website is generated using this approach - let’s learn how to build and deploy it together!
→ Start with Rails and Hotwire

What you will learn
This guide will teach you how to transform Rails into a powerful static site generator, leveraging a modern Hotwire stack. You will discover how to:
- Create a minimal Rails application optimized for static site generation
- Process markdown content with frontmatter using Decant and kramdown
- Deploy automatically to GitHub Pages with Parklife
- Use ERB template processing for dynamic content generation within markdown files
- Enhance user experience with Turbo Drive for instant page navigation
- Add interactive features using Stimulus controllers
- Manage JavaScript dependencies with Importmap for modern ES modules
- Implement live-reloading during development with Hotwire Spark
- Style your site effortlessly with classless CSS frameworks
- Add syntax highlighting to code blocks with Rouge
- Optimize for SEO with proper web page metadata and Open Graph tags
- Generate XML sitemaps and robots.txt files for search engines
What you need
Before starting, you should have:
- Basic knowledge of Ruby and Rails
- Ruby 3.4+ and Rails 8.0+ installed on your system
- A GitHub account for repository hosting and Pages deployment
- Familiarity with Markdown syntax for content creation
- Basic understanding of JavaScript and CSS
- GitHub CLI installed (optional, for easier repository setup)
→ Start with Rails and Hotwire
About
This guide and website were created by François Catuhe and are available on GitHub.