Skip to content

Instantly share code, notes, and snippets.

@gma
Created September 28, 2010 15:54
Show Gist options
  • Save gma/601250 to your computer and use it in GitHub Desktop.
Save gma/601250 to your computer and use it in GitHub Desktop.
# To redirect to your latest article when somebody hits the home page
# of your Nesta site, try this:
#
# $ mkdir -p local
# $ cat >> local/app.rb # then paste in this code and type Ctrl-D
get "/" do
latest = Page.find_articles[0]
redirect latest.abspath
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment