You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
442 B
Python

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/<file>')
def send_img(file):
return send_from_directory(app.root_path + '/img/', file, conditional=True)
app.run(port="3000", debug=True)