From 8053468ca51e2993f6c5d3ce9242100a140add3a Mon Sep 17 00:00:00 2001 From: s2marine Date: Sun, 7 Aug 2022 18:41:11 +0800 Subject: [PATCH] Add support for context path (#313) * Add support for context path add an optional environment variable: LD_CONTEXT_PATH * Fix for pull request code review comments Co-authored-by: s2marine --- .env.sample | 3 ++ bookmarks/templates/bookmarks/layout.html | 2 +- bookmarks/tests/test_context_path.py | 53 +++++++++++++++++++++++ bookmarks/views/settings.py | 2 +- docs/Options.md | 9 +++- siteroot/settings/base.py | 11 +++-- siteroot/urls.py | 4 ++ uwsgi.ini | 4 ++ 8 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 bookmarks/tests/test_context_path.py diff --git a/.env.sample b/.env.sample index 32143e6..3ff8bb7 100644 --- a/.env.sample +++ b/.env.sample @@ -4,6 +4,9 @@ LD_CONTAINER_NAME=linkding LD_HOST_PORT=9090 # Directory on the host system that should be mounted as data dir into the Docker container LD_HOST_DATA_DIR=./data +# Can be used to run linkding under a context path, for example: linkding/ +# Must end with a slash `/` +LD_CONTEXT_PATH= # Option to disable background tasks LD_DISABLE_BACKGROUND_TASKS=False diff --git a/bookmarks/templates/bookmarks/layout.html b/bookmarks/templates/bookmarks/layout.html index 16147e9..f2be882 100644 --- a/bookmarks/templates/bookmarks/layout.html +++ b/bookmarks/templates/bookmarks/layout.html @@ -44,7 +44,7 @@ {% endif %}