From c4be3b43e5745525bd866e1aa3574beda6de84ed Mon Sep 17 00:00:00 2001 From: sabaimran Date: Tue, 6 Aug 2024 14:50:44 +0530 Subject: [PATCH] Add the compiled folder to the list of directories to look through for static templates --- src/khoj/routers/web_client.py | 2 +- src/khoj/utils/constants.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/khoj/routers/web_client.py b/src/khoj/routers/web_client.py index f890f6b3..937b5cdf 100644 --- a/src/khoj/routers/web_client.py +++ b/src/khoj/routers/web_client.py @@ -14,7 +14,7 @@ from khoj.utils.rawconfig import GithubContentConfig, GithubRepoConfig # Initialize Router web_client = APIRouter() -templates = Jinja2Templates([constants.web_directory, constants.next_js_directory]) +templates = Jinja2Templates([constants.web_directory, constants.next_js_directory, constants.pypi_static_directory]) # Create Routes diff --git a/src/khoj/utils/constants.py b/src/khoj/utils/constants.py index d8a54691..c3d8a186 100644 --- a/src/khoj/utils/constants.py +++ b/src/khoj/utils/constants.py @@ -3,6 +3,7 @@ from pathlib import Path app_root_directory = Path(__file__).parent.parent.parent web_directory = app_root_directory / "khoj/interface/web/" next_js_directory = app_root_directory / "khoj/interface/built/" +pypi_static_directory = app_root_directory / "khoj/interface/compiled/" empty_escape_sequences = "\n|\r|\t| " app_env_filepath = "~/.khoj/env" telemetry_server = "https://khoj.beta.haletic.com/v1/telemetry"