forked from unit/ciclostile
add recursive search
This commit is contained in:
parent
eccff07b8f
commit
a32f16e07e
|
@ -1,4 +1,6 @@
|
|||
import os
|
||||
from glob import glob
|
||||
|
||||
from flask import Blueprint, send_from_directory, render_template, request, jsonify
|
||||
from flask_httpauth import HTTPDigestAuth
|
||||
import ciclostile
|
||||
|
@ -56,5 +58,5 @@ POST_DIR = "."
|
|||
|
||||
@api.route("/posts")
|
||||
def posts_list():
|
||||
dirs = os.listdir(os.path.join(POST_DIR))
|
||||
return jsonify(dirs)
|
||||
posts = glob(f"{POST_DIR}/**/*.md", recursive=True)
|
||||
return jsonify(posts)
|
||||
|
|
Loading…
Reference in New Issue
Block a user