Last active
December 11, 2015 10:08
-
-
Save arnab/4584901 to your computer and use it in GitHub Desktop.
Things I had to do "differently" to migrate site to octopress
This file contains hidden or 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
# Without setting thr LANG, I'd get errors from Ruby like this: | |
# YAML Exception reading 2012-09-23-state-of-e-commerce-in-india.md: invalid byte sequence in US-ASCII | |
# /Users/arnabdeka/Dropbox/websites/arnab.github.com/plugins/backtick_code_block.rb:13:in `gsub': invalid byte sequence in US-ASCII (ArgumentError) | |
# from /Users/arnabdeka/Dropbox/websites/arnab.github.com/plugins/backtick_code_block.rb:13:in `render_code_block' | |
# ... | |
# I got the idea while reading this rubygems issue: https://github.com/rubygems/rubygems/issues/314 | |
export LANG=en_US.utf-8 |
This file contains hidden or 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
for file in source/**/*.md; do | |
mv $file $file.tmp; | |
awk '/---/&&v++%2{sub(/---/, "comments: true\n---")}{print}' $file.tmp > $file; | |
rm $file.tmp; | |
done | |
git st | |
git diff -b # verify all good. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment