module Hoe::Publish

def post_blog_zenweb site # :nodoc:

:nodoc:
def post_blog_zenweb site # :nodoc:
  dir = site["path"]
  _, title, body, urls = announcement
  body += "\n\n#{urls}"
  Dir.chdir File.expand_path dir do
    time = Time.at Time.now.to_i # nukes fractions
    path = [time.strftime("%Y-%m-%d-"),
            title.sub(/\W+$/, "").gsub(/\W+/, "-"),
            ".html.md"].join
    header = {
      "title"      => title,
      "categories" => blog_categories,
      "date"       => time,
    }
    File.open path, "w" do |f|
      f.puts header.to_yaml.gsub(/\s$/, "")
      f.puts "..."
      f.puts
      f.puts body
    end
  end
end