From 04c687403e21f883f9614e6a24df9ec450cfc111 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 11:49:33 +0100 Subject: [PATCH 01/24] [fix] brands: add variables from build env to jinja templating We have some variables in the build environment which are also needed in the templating process. Theses variables are relavant if one creates a fork with its own branding. We treat these variables under the term 'brands'. Signed-off-by: Markus Heiser --- Makefile | 13 ++++++++++--- searx/templates/__common__/about.html | 12 ++++++------ searx/templates/courgette/github_ribbon.html | 4 ++-- searx/templates/legacy/github_ribbon.html | 2 +- searx/templates/oscar/base.html | 8 ++++---- searx/templates/simple/base.html | 6 +++--- searx/webapp.py | 3 +++ 7 files changed, 29 insertions(+), 19 deletions(-) mode change 100644 => 100755 searx/webapp.py diff --git a/Makefile b/Makefile index 5a47129e4..3b2d499e8 100644 --- a/Makefile +++ b/Makefile @@ -71,15 +71,22 @@ $(GH_PAGES):: # update project files # -------------------- -PHONY += project engines-languages +PHONY += project engines-languages searx.brand -project: searx/data/engines_languages.json +project: searx/data/engines_languages.json searx.brand -searx/data/engines_languages.json: pyenvinstall +engines-languages: pyenvinstall $(PY_ENV_ACT); python utils/fetch_languages.py mv engines_languages.json searx/data/engines_languages.json mv languages.py searx/languages.py +searx.brand: + $(Q)echo "build searx/brand.py" + $(Q)echo "GIT_URL = '$(GIT_URL)'" > searx/brand.py + $(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py + $(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py + $(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py + # test # ---- diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.html index ff86ddd28..d8e1335d9 100644 --- a/searx/templates/__common__/about.html +++ b/searx/templates/__common__/about.html @@ -7,7 +7,7 @@

If you do care about privacy, want to be a conscious user, or otherwise believe in digital freedom, make searx your default search engine or run it on your own server

@@ -22,14 +22,14 @@ Searx can be added to your browser's search bar; moreover, it can be set as the

How can I make it my own?

-

Searx appreciates your concern regarding logs, so take the code and run it yourself!
Add your Searx to this list to help other people reclaim their privacy and make the Internet freer! +

Searx appreciates your concern regarding logs, so take the code and run it yourself!
Add your Searx to this list to help other people reclaim their privacy and make the Internet freer!
The more decentralized the Internet is, the more freedom we have!

More about searx