diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-12-21 00:37:45 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-01-11 22:12:38 +0100 |
commit | 9485179064b4eb28f2813eba3c295edca3b0db7f (patch) | |
tree | e9f5f003e9887aa130a3f19d82a1d9ace898504b /docs | |
parent | dbfd5567aaa06a5f9792bb0839af74877ed5258c (diff) | |
download | searxng-9485179064b4eb28f2813eba3c295edca3b0db7f.tar.gz searxng-9485179064b4eb28f2813eba3c295edca3b0db7f.zip |
[mod] move brand options from Makefile to settings.yml
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/admin/installation.rst | 2 | ||||
-rw-r--r-- | docs/admin/settings.rst | 24 | ||||
-rw-r--r-- | docs/blog/lxcdev-202006.rst | 4 | ||||
-rw-r--r-- | docs/conf.py | 38 | ||||
-rw-r--r-- | docs/dev/makefile.rst | 40 | ||||
-rw-r--r-- | docs/utils/index.rst | 4 |
6 files changed, 53 insertions, 59 deletions
diff --git a/docs/admin/installation.rst b/docs/admin/installation.rst index 4a301ecf8..8a066dec7 100644 --- a/docs/admin/installation.rst +++ b/docs/admin/installation.rst @@ -76,6 +76,6 @@ If all services are running fine, you can add it to your HTTP server: .. tip:: About script's installation options have a look at chapter :ref:`toolboxing - setup`. How to brand your instance see chapter :ref:`makefile setup`. To + setup`. How to brand your instance see chapter :ref:`settings global`. To *stash* your instance's setup, `git stash`_ your clone's :origin:`Makefile` and :origin:`.config.sh` file . diff --git a/docs/admin/settings.rst b/docs/admin/settings.rst index 985c16f85..cc4007d2f 100644 --- a/docs/admin/settings.rst +++ b/docs/admin/settings.rst @@ -40,11 +40,35 @@ Global Settings general: debug : False # Debug mode, only for development instance_name : "searx" # displayed name + git_url: https://github.com/searx/searx + git_branch: master + issue_url: https://github.com/searx/searx/issues + docs_url: https://searx.github.io/searx + public_instances: https://searx.space + contact_url: False # mailto:contact@example.com + wiki_url: https://github.com/searx/searx/wiki + twitter_url: https://twitter.com/Searx_engine ``debug`` : Allow a more detailed log if you run searx directly. Display *detailed* error messages in the browser too, so this must be deactivated in production. +``contact_url``: + Contact mail address or WEB form. + +``git_url`` and ``git_branch``: + Changes this, to point to your searx fork (branch). + +``docs_url`` + If you host your own documentation, change this URL. + +``wiki_url``: + Link to your wiki (or ``False``) + +``twitter_url``: + Link to your tweets (or ``False``) + + .. code:: yaml server: diff --git a/docs/blog/lxcdev-202006.rst b/docs/blog/lxcdev-202006.rst index b8d470d4e..2bea19807 100644 --- a/docs/blog/lxcdev-202006.rst +++ b/docs/blog/lxcdev-202006.rst @@ -259,8 +259,8 @@ suite. For this, we have to keep an eye on the :ref:`installation basic`: - virtualenv in: ``/usr/local/searx/searx-pyenv`` - searx software in: ``/usr/local/searx/searx-src`` -The searx software is a clone of the ``GIT_URL`` (see :ref:`makefile setup`) and -the working tree is checked out from the ``GIT_BRANCH``. With the use of the +The searx software is a clone of the ``git_url`` (see :ref:`settings global`) and +the working tree is checked out from the ``git_branch``. With the use of the :ref:`searx.sh` the searx service was installed as :ref:`uWSGI application <searx uwsgi>`. To maintain this service, we can use ``systemctl`` (compare :ref:`service architectures on distributions <uwsgi configuration>`). diff --git a/docs/conf.py b/docs/conf.py index 0c07761a8..e467c6262 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,14 +2,10 @@ import sys, os from sphinx_build_tools import load_sphinx_config -from searx.version import VERSION_STRING from pallets_sphinx_themes import ProjectLink -from searx.brand import GIT_URL -GIT_BRANCH = os.environ.get("GIT_BRANCH", "master") -from searx.brand import SEARX_URL -from searx.brand import DOCS_URL - +from searx import brand +from searx.version import VERSION_STRING # Project -------------------------------------------------------------- @@ -46,10 +42,10 @@ extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ') extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ') # links to custom brand -extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://') -extlinks['patch'] = (GIT_URL + '/commit/%s', '#') -extlinks['search'] = (SEARX_URL + '/%s', '#') -extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ') +extlinks['origin'] = (brand.GIT_URL + '/blob/' + brand.GIT_BRANCH + '/%s', 'git://') +extlinks['patch'] = (brand.GIT_URL + '/commit/%s', '#') +extlinks['search'] = (brand.SEARX_URL + '/%s', '#') +extlinks['docs'] = (brand.DOCS_URL + '/%s', 'docs: ') extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ') extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '') #extlinks['role'] = ( @@ -104,14 +100,20 @@ imgmath_font_size = 14 # sphinx.ext.imgmath setup END html_theme_options = {"index_sidebar_logo": True} -html_context = { - "project_links": [ - ProjectLink("Source", GIT_URL), - ProjectLink("Wiki", "https://github.com/searx/searx/wiki"), - ProjectLink("Public instances", "https://searx.space/"), - ProjectLink("Twitter", "https://twitter.com/Searx_engine"), - ] -} +html_context = {"project_links": [] } +if brand.GIT_URL: + html_context["project_links"].append(ProjectLink("Source", brand.GIT_URL)) +if brand.WIKI_URL: + html_context["project_links"].append(ProjectLink("Wiki", brand.WIKI_URL)) +if brand.PUBLIC_INSTANCES: + html_context["project_links"].append(ProjectLink("Public instances", brand.PUBLIC_INSTANCES)) +if brand.TWITTER_URL: + html_context["project_links"].append(ProjectLink("Twitter", brand.TWITTER_URL)) +if brand.ISSUE_URL: + html_context["project_links"].append(ProjectLink("Issue Tracker", brand.ISSUE_URL)) +if brand.CONTACT_URL: + html_context["project_links"].append(ProjectLink("Contact", brand.CONTACT_URL)) + html_sidebars = { "**": ["project.html", "relations.html", "searchbox.html"], } diff --git a/docs/dev/makefile.rst b/docs/dev/makefile.rst index c43855617..f93855927 100644 --- a/docs/dev/makefile.rst +++ b/docs/dev/makefile.rst @@ -8,8 +8,7 @@ Makefile Targets .. sidebar:: build environment - Before looking deeper at the targets, first read about :ref:`makefile setup` - and :ref:`make pyenv`. + Before looking deeper at the targets, first read about :ref:`make pyenv`. To install system requirements follow :ref:`buildhosts`. @@ -28,37 +27,6 @@ Calling the ``help`` target gives a first overview (``make help``): :local: :backlinks: entry - -.. _makefile setup: - -Makefile setup -============== - -.. _git stash: https://git-scm.com/docs/git-stash - -.. sidebar:: fork & upstream - - Commit changes in your (local) branch, fork or whatever, but do not push them - upstream / `git stash`_ is your friend. - -The main setup is done in the :origin:`Makefile`. - -.. literalinclude:: ../../Makefile - :start-after: START Makefile setup - :end-before: END Makefile setup - -:GIT_URL: Changes this, to point to your searx fork. -:GIT_BRANCH: Changes this, to point to your searx branch. -:SEARX_URL: Changes this, to point to your searx instance. -:DOCS_URL: If you host your own (*brand*) documentation, change this URL. - -If you change any of this build environment variables, you have to run ``make -buildenv``:: - - $ make buildenv - build searx/brand.py - build utils/brand.env - .. _make pyenv: Python environment @@ -148,7 +116,7 @@ clean`` stop all processes using :ref:`make pyenv`. We describe the usage of the ``doc*`` targets in the :ref:`How to contribute / Documentation <contrib docs>` section. If you want to edit the documentation read our :ref:`make docs-live` section. If you are working in your own brand, -adjust your :ref:`Makefile setup <makefile setup>`. +adjust your :ref:`settings global`. .. _make books: @@ -185,8 +153,8 @@ Use ``make docs-help`` to see which books available: ``make gh-pages`` ================= -To deploy on github.io first adjust your :ref:`Makefile setup <makefile -setup>`. For any further read :ref:`deploy on github.io`. +To deploy on github.io first adjust your :ref:`settings global`. For any +further read :ref:`deploy on github.io`. .. _make test: diff --git a/docs/utils/index.rst b/docs/utils/index.rst index ada78cef3..28515318f 100644 --- a/docs/utils/index.rst +++ b/docs/utils/index.rst @@ -47,8 +47,8 @@ Scripts to maintain services often dispose of common commands and environments. Tooling box setup ================= -The main setup is done in the :origin:`.config.sh` (read also :ref:`makefile -setup`). +The main setup is done in the :origin:`.config.sh` (read also :ref:`settings +global`). .. literalinclude:: ../../.config.sh :language: bash |