Skip to content

About

A thoughtful collection of gems to use Rails and all its magic goodies for static site generation.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

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, Perron, 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.

→ Rails Static


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

→ Rails Static

About

A thoughtful collection of gems to use Rails and all its magic goodies for static site generation.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Contributors

Languages