mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix static file folder path for the pypi build
- Since the .gitignore will ignore any of the assets in the src/ folder when building the package wheel, we need to output the static assets to another folder just for the python pypi package. Use /compiled for this.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"cicollectstatic": "bash -c 'pushd ../../../ && python3 src/khoj/manage.py collectstatic --noinput && popd'",
|
||||
"export": "yarn build && cp -r out/ ../../khoj/interface/built && yarn collectstatic",
|
||||
"ciexport": "yarn build && cp -r out/ ../../khoj/interface/built && yarn cicollectstatic",
|
||||
"pypiciexport": "yarn build && cp -r out/ /opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/khoj/interface/built && yarn cicollectstatic",
|
||||
"pypiciexport": "yarn build && cp -r out/ /opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/khoj/interface/compiled && yarn cicollectstatic",
|
||||
"watch": "nodemon --watch . --ext js,jsx,ts,tsx,css --ignore 'out/**/*' --exec 'yarn export'",
|
||||
"windowswatch": "nodemon --watch . --ext js,jsx,ts,tsx,css --ignore 'out/**/*' --exec 'yarn windowsexport'",
|
||||
"windowscollectstatic": "cd ..\\..\\.. && .\\.venv\\Scripts\\Activate.bat && py .\\src\\khoj\\manage.py collectstatic --noinput && .\\.venv\\Scripts\\deactivate.bat && cd ..",
|
||||
|
||||
@@ -166,7 +166,12 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/4.2/howto/static-files/
|
||||
|
||||
STATIC_ROOT = BASE_DIR / "static"
|
||||
STATICFILES_DIRS = [BASE_DIR / "interface/web", BASE_DIR / "interface/email", BASE_DIR / "interface/built"]
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "interface/web",
|
||||
BASE_DIR / "interface/email",
|
||||
BASE_DIR / "interface/built",
|
||||
BASE_DIR / "interface/compiled",
|
||||
]
|
||||
STATIC_URL = "/static/"
|
||||
|
||||
# Default primary key field type
|
||||
|
||||
Reference in New Issue
Block a user