app/controllers/posts_controller.rb
## expects import of a markdown file from a wordpress export and blog2md
## Example:
## ---
## title: 'post title'
## date: Mon, 16 Sep 2019 03:51:34 +0000
## ---
## ![](https://path.to/image.jpg)
##
## Post conent
expects import of a markdown file from a wordpress export and blog2md
Example.





Post conent
expects import of a markdown file from a wordpress export and blog2md Example . Post conent
def import
    local_file_dir = params[:filedir]
    local_img_dir = params[:imgdir]
    Dir["#{local_file_dir}*"].each do |local_filename|
      import_md_file(local_filename, local_img_dir)
    end
    redirect_to posts_path
  end
def import local_file_dir = params [ :filedir ] local_img_dir = params [ :imgdir ] Dir [ "#{local_file_dir}*" ] . each do | local_filename | import_md_file ( local_filename , local_img_dir ) end redirect_to posts_path end
expects import of a markdown file from a wordpress export and blog2md
Example:
expects import of a markdown file from a wordpress export and blog2md Example :