Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added support for handling extended posts

  • Loading branch information...
commit 250673e7ea076d49d2a3c3fae3c673332d290b0d 1 parent 4499df8
Mark Bainter authored March 17, 2012

Showing 1 changed file with 10 additions and 0 deletions. Show diff stats Hide diff stats

  1. 10  lib/jekyll/migrators/typo.rb
10  lib/jekyll/migrators/typo.rb
@@ -13,6 +13,7 @@ module Typo
13 13
            c.title title,
14 14
            c.permalink slug,
15 15
            c.body body,
  16
+           c.extended extended,
16 17
            c.published_at date,
17 18
            c.state state,
18 19
            COALESCE(tf.name, 'html') filter
@@ -27,6 +28,15 @@ def self.process dbname, user, pass, host='localhost'
27 28
       db[SQL].each do |post|
28 29
         next unless post[:state] =~ /published/
29 30
 
  31
+        if(post[:slug] == nil) then
  32
+          post[:slug] = "no slug"
  33
+        end
  34
+
  35
+        if(post[:extended]) then
  36
+          post[:body] << "\n<!-- more -->\n"
  37
+          post[:body] << post[:extended]
  38
+        end
  39
+
30 40
         name = [ sprintf("%.04d", post[:date].year),
31 41
                  sprintf("%.02d", post[:date].month),
32 42
                  sprintf("%.02d", post[:date].day),

0 notes on commit 250673e

Please sign in to comment.
Something went wrong with that request. Please try again.