Skip to content

Commit

Permalink
Added support for handling extended posts
Browse files Browse the repository at this point in the history
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
  • Loading branch information
mbainter authored and parkr committed Jan 31, 2013
1 parent 20df6cb commit daaabe0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/jekyll/importers/typo.rb
Expand Up @@ -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
Expand All @@ -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),
Expand Down

0 comments on commit daaabe0

Please sign in to comment.