Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyagawa/1a01c0c0e4afed8da904 to your computer and use it in GitHub Desktop.
Save miyagawa/1a01c0c0e4afed8da904 to your computer and use it in GitHub Desktop.
---
layout: none
---
{% for post in site.posts %}{% if post.soundcloud_url %}rewrite ^{{ post.audio | replace: 'http://cache.rebuild.fm', '' }} {{ post.soundcloud_url }};
{% endif %}{% endfor %}
desc "Set up nginx redirects"
task :redirects do
system "bundle exec jekyll build"
system "scp _site/redirects.conf root@#{HOST}:/var/www/cache.rebuild.fm/"
system "ssh -l root #{HOST} 'nginx -t && nginx -s reload'"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment