Created
May 9, 2012 15:35
-
-
Save mattsgarrison/2645606 to your computer and use it in GitHub Desktop.
Adding Gists to RefineryCMS-Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-# This is the default way the file puts post content on the page. %> | |
<%= @post.body.html_safe %> | |
<%-# This is the replacement for that line. %> | |
<%= raw @post.body.html_safe.gsub(/\[gist:(\d+)(\,)(.+)\]/,"<script src='https://gist.github.com/\\1.js?file=\\3'></script>") %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake refinery:override view=refinery/blog/posts/_post.html.erb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gist:2645606,override.sh] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment