from flask import Flask, render_template, send_from_directory from markdown import markdown app = Flask(__name__) @app.route('/') def list(): with open('list.md',"r") as f: text = f.read() list = markdown(text) return render_template('list.html', list = list) @app.route('/img/') def send_img(file): return send_from_directory(app.root_path + '/img/', file, conditional=True) app.run(port="3000", debug=True)