|
|
|
@ -30,7 +30,7 @@ def render():
|
|
|
|
|
for entry in index:
|
|
|
|
|
with open(os.path.join("contents", entry)) as e:
|
|
|
|
|
html = markdown(
|
|
|
|
|
e.read(),
|
|
|
|
|
e.read().replace("../img", "img"),
|
|
|
|
|
extensions=[
|
|
|
|
|
"markdown.extensions.attr_list",
|
|
|
|
|
"markdown.extensions.codehilite",
|
|
|
|
@ -55,6 +55,11 @@ def home():
|
|
|
|
|
return send_from_directory(app.root_path, "index.html")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/img/<filename>")
|
|
|
|
|
def send_image(filename):
|
|
|
|
|
return send_from_directory(os.path.join(app.root_path, "contents", "img"), filename)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/update", methods=["GET", "POST"])
|
|
|
|
|
def update():
|
|
|
|
|
if request.method == "POST":
|
|
|
|
|