Parklife

Parklife is a Ruby library to render a Rack app (Rails/Sinatra/etc) to a static build ready to be served by GitHub Pages, Netlify, S3, Vercel, or any other server.

Getting started

Add Parklife to your application’s Gemfile and run bundle install.

gem 'parklife'

Now run parklife init to generate a Parkfile configuration file and build script:

bundle exec parklife init

Include some Rails- or Sinatra-specific settings by passing --rails or --sinatra, and create a GitHub Actions workflow to generate your Parklife build and push it to GitHub Pages by passing --github-pages.

In the generated Parkfile register some routes for Parklife to fetch:

Parklife.application.routes do
  root crawl: true
end

Finally, run parklife build to crawl your app and create a static build.