feat: Added tools page
All checks were successful
Build Docker / BuildImage (push) Successful in 2m9s
All checks were successful
Build Docker / BuildImage (push) Successful in 2m9s
This commit is contained in:
@@ -10,6 +10,10 @@ blog_bp = Blueprint('blog', __name__)
|
||||
|
||||
def list_page_files():
|
||||
blog_pages = os.listdir("data/blog")
|
||||
# Sort pages by modified time, newest first
|
||||
blog_pages.sort(
|
||||
key=lambda x: os.path.getmtime(os.path.join("data/blog", x)), reverse=True)
|
||||
|
||||
# Remove .md extension
|
||||
blog_pages = [page.removesuffix(".md")
|
||||
for page in blog_pages if page.endswith(".md")]
|
||||
|
||||
9
blueprints/template.py
Normal file
9
blueprints/template.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from flask import Blueprint, request
|
||||
from tools import json_response
|
||||
|
||||
template_bp = Blueprint('template', __name__)
|
||||
|
||||
|
||||
@template_bp.route("/")
|
||||
def index():
|
||||
return json_response(request, "Success", 200)
|
||||
Reference in New Issue
Block a user