For about two years I have been blogging from Tumblr hosted blog. It’s an awesome service and it’s so easy to publish text, photos, audio, video, etc. However, since most of my articles are code related I decided to give Octopress a try, and I love it!
Octopress is a framework for Jekyll, the blog aware static site generator written in Ruby and powering GitHub pages. Octopress adds some sugar to Jekyll, such as HTML templates, CSS, JavaScripts and configuration.
Hence, let me first summarize what I liked about Jekyll:
- Static: Jekyll generates static HTML pages ready to be hosted anywhere. This means, I can easily host my blog at Github Pages or even Dropbox?
- Managing posts: It is now much easier to manage my blog posts. I can use the power of my TextMate editor or Bash shell to perform comprehensive operations, such as find/replace, regular expressions, etc, which are not possible with a hosted blog service.
- Markdown: It allows me to write blog posts in Markdown. No need to mess up with an awful WYSIWYG HTML editor at Tumblr.
- Git: My blog posts are now in a Git version control system. I can store entire history of my blog on Dropbox or Github. I also can write my posts while offline, preview markdown in TextMate, run Blog locally, and commit to Git.
- Beautiful code snippets: With a Sass port of Solarized syntax highlighting, Octopress makes it easy to share highlighted code snippets. Moreover, it adds support for
codeblockandgisttags (browse through my blog, you will see how great they look!).
So how did I migrate?
Honestly, it took quite a while. Even though, there is a Tumblr to Jekyll script, you will still have to do some manual work. Here are some hints to help you migrate:
- Setup Octopress, see how to setup Octopress.
- Follow instructions at Tumblr to Jekyll to get necessary dependencies.
- Download tumblr.rb that supports Markdown conversion. I had to patch the script since Octopress uses .markdown extensions and for some reason several Tumblr blog posts could not be converted to Markdown, so I had to redirect output of html2text to a file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
- I assume your Octopress blog is working and you are in its root directory. Now, you need to put a modified version of
tumblr.rbto the right place and run it:
1 2 | |
- The script will create Tumblr posts in Markdown format. In order to support old Tumblr URLs, it will also create static pages in post directory with HTML redirects. Let’s move them to the right place in Octopress:
1 2 3 4 | |
Then, I have gone through all pages and aligned the images. I also ran find/replace to all tumblr_files images, which were fetched from Tumblr during migration.
Finally, I customized my theme and installed tag cloud plugin.
I might have forgotten something, so if you are in trouble let me know and I will try to help.
Happy blogging!