def generate
      begin
        # 删除要输出的路径
        FileUtils.mkdir_p(self.tmp_deploy_path)

        ::Docwu::Utils.cp_r("#{plain_path('/assets')}", "#{self.tmp_deploy_path}/assets")

        # 复制静态文件里去
        ::Docwu::Utils.cp_r("#{plain_path('/static')}", "#{self.tmp_deploy_path}/static")

        self.folders.each do |folder|
          folder.generate
        end

        self.topics.each do |topic|
          topic.generate
        end

      rescue Exception => exception
        FileUtils.rm_rf(self.tmp_deploy_path)
        raise "#{exception}"
      else
        FileUtils.rm_rf(self.deploy_path)
        FileUtils.mv(self.tmp_deploy_path, self.deploy_path)
      ensure
      end
    end
def generate
      begin
        # 删除要输出的路径
        FileUtils.mkdir_p(self.tmp_deploy_path)

        ::Docwu::Utils.cp_r("#{plain_path('/assets')}", "#{self.tmp_deploy_path}/assets")

        # 复制静态文件里去
        ::Docwu::Utils.cp_r("#{plain_path('/static')}", "#{self.tmp_deploy_path}/static")

        self.folders.each do |folder|
          folder.generate
        end

        self.topics.each do |topic|
          topic.generate
        end

      rescue Exception => exception
        FileUtils.rm_rf(self.tmp_deploy_path)
        raise "#{exception}"
      else
        FileUtils.rm_rf(self.deploy_path)
        FileUtils.mv(self.tmp_deploy_path, self.deploy_path)
      ensure
      end
    end
输出:
   TODO: 先生成临时目录， 然后 -> deploy