Permalink
Browse files

Added support for handling extended posts

  • Loading branch information...
1 parent 4499df8 commit 250673e7ea076d49d2a3c3fae3c673332d290b0d @mbainter committed Mar 17, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/jekyll/migrators/typo.rb
@@ -13,6 +13,7 @@ module Typo
c.title title,
c.permalink slug,
c.body body,
+ c.extended extended,
c.published_at date,
c.state state,
COALESCE(tf.name, 'html') filter
@@ -27,6 +28,15 @@ def self.process dbname, user, pass, host='localhost'
db[SQL].each do |post|
next unless post[:state] =~ /published/
+ if(post[:slug] == nil) then
+ post[:slug] = "no slug"
+ end
+
+ if(post[:extended]) then
+ post[:body] << "\n<!-- more -->\n"
+ post[:body] << post[:extended]
+ end
+
name = [ sprintf("%.04d", post[:date].year),
sprintf("%.02d", post[:date].month),
sprintf("%.02d", post[:date].day),

0 comments on commit 250673e

Please sign in to comment.