diff --git a/routes/main_routes.py b/routes/main_routes.py index 5cb3459..d347755 100644 --- a/routes/main_routes.py +++ b/routes/main_routes.py @@ -10,10 +10,19 @@ from utils.file_server import read_starter_code, resolve_starter_file, get_starter_code_dir import os +from utils.link_helper import parse_external_link + # Create the Blueprint that app.py will register main = Blueprint("main", __name__) +@main.app_template_filter("parse_resource") +def parse_resource_filter(resource_str): + """Jinja filter to parse a resource string into a standardized dict.""" + return parse_external_link(resource_str) + + + @main.route("/") def index(): """Render the homepage with the skill input form and dynamic stats.""" diff --git a/templates/project.html b/templates/project.html index 85fa923..fe0a0fc 100644 --- a/templates/project.html +++ b/templates/project.html @@ -175,20 +175,14 @@

Learning Resources