diff --git a/poaster.rb b/poaster.rb index 0045cb1..c7adef6 100644 --- a/poaster.rb +++ b/poaster.rb @@ -37,10 +37,9 @@ ensure_dir_exists(post_directory) # Create post string post = %(---\n) -post_id = '' +post_id = Time.new.strftime('%Y-%m-%d_%H:%M') frontmatter.each_with_index do |item, i| post += %(#{item.keys[0]}: #{item[item.keys[0]]}) - post_id += %(#{item[item.keys[0]].chomp}#{i == frontmatter.length - 1 ? '' : '_'}) end post += %(---\n#{post_content})