diff --git a/docs/configuration.md b/docs/configuration.md index 464cfa9a..d7ffa15c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -129,6 +129,7 @@ Web server settings. If any of `host`/`port` is not set, web integration will be * `debug_check_host` - check hosts to access debug toolbar, boolean, optional, default `no`. * `debug_allowed_hosts` - allowed hosts to get access to debug toolbar, space separated list of string, optional. * `host` - host to bind, string, optional. +* `index_url` - full url of the repository index page, string, optional. * `password` - password to authorize in web service in order to update service status, string, required in case if authorization enabled. * `port` - port to bind, int, optional. * `static_path` - path to directory with static files, string, required. diff --git a/package/share/ahriman/build-status.jinja2 b/package/share/ahriman/build-status.jinja2 index f587a10e..38423c9d 100644 --- a/package/share/ahriman/build-status.jinja2 +++ b/package/share/ahriman/build-status.jinja2 @@ -100,6 +100,12 @@
  • report a bug
  • + {% if index_url is not none %} + + {% endif %} + {% if auth.enabled %} {% if auth.username is none %} {{ auth.control|safe }} diff --git a/src/ahriman/web/views/index.py b/src/ahriman/web/views/index.py index 5c1d58f8..23e4021a 100644 --- a/src/ahriman/web/views/index.py +++ b/src/ahriman/web/views/index.py @@ -42,6 +42,7 @@ class IndexView(BaseView): * control - HTML to insert for login control, HTML string, required * enabled - whether authorization is enabled by configuration or not, boolean, required * username - authenticated username if any, string, null means not authenticated + index_url - url to the repository index, string, optional packages - sorted list of packages properties, required * base, string * depends, sorted list of strings @@ -102,6 +103,7 @@ class IndexView(BaseView): return { "architecture": self.service.architecture, "auth": auth, + "index_url": self.configuration.get("web", "index_url", fallback=None), "packages": packages, "repository": self.service.repository.name, "service": service,