prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Allow site title to be customised
  ## Overview
  
  Allow the site title to be customised; it’s currently hardcoded as ‘Kolibri’.
  
  #### Description and outcomes
  
  The site title is used in only a few places: the `<title>` of the base page and the ‘unsupported browser’ page, and the name in the PWA manifest.
  
  Almost all of the time, the title is overridden by the plugin being used, via vuejs, so users will typically see something like ‘Explore’ or ‘Library’ instead of ‘Kolibri’.
  
  The place where the default ‘Kolibri’ title is slightly problematic at the moment is in the PWA plugin: the name of the PWA is set to ‘Kolibri’, and that’s shown much more prominently in the browser’s list of PWA apps, or on the desktop app chooser when trying to run it.
  
  For Endless Key in particular, that’s a bit problematic because users will likely try to find the PWA from their desktop by searching for ‘Endless Key’ rather than ‘Kolibri’.
  
  So it would be good to either be able to:
   - Separate the site title from the name of the platform (which will always be Kolibri), and allow the site title to be customised.
   - Or, specifically set the site title in the configuration for the PWA plugin.
  
  The second option is much more self-contained, but doesn’t seem semantically correct to me. The PWA manifest should be reflecting the main site’s configuration.
  
  #### Resources
  
   - https://developer.mozilla.org/en-US/docs/Web/Manifest/name
   - https://developer.mozilla.org/en-US/docs/Web/Manifest/short_name
  
  #### Accessibility Requirements
  
  Having an installed PWA use the name the users will be most familiar with it seems like an accessibility issue, although I have not been approaching it from that angle and don’t know which specific accessibility spec applies here.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `kolibri/core/templatetags/core_tags.py`
  Content:
  ```
  1 """
  2 Kolibri template tags
  3 =====================
  4 """
  5 from __future__ import absolute_import
  6 from __future__ import print_function
  7 from __future__ import unicode_literals
  8 
  9 from django import template
  10 from django.templatetags.static import static
  11 from django.utils.html import format_html
  12 
  13 from kolibri.core.hooks import FrontEndBaseASyncHook
  14 from kolibri.core.hooks import FrontEndBaseHeadHook
  15 from kolibri.core.hooks import FrontEndBaseSyncHook
  16 from kolibri.core.theme_hook import ThemeHook
  17 
  18 register = template.Library()
  19 
  20 
  21 @register.simple_tag()
  22 def frontend_base_assets():
  23     """
  24     This is a script tag for all ``FrontEndAssetHook`` hooks that implement a
  25     render_to_html() method - this is used in ``/base.html`` template to
  26     populate any Javascript and CSS that should be loaded at page load.
  27 
  28     :return: HTML of script tags to insert into base.html
  29     """
  30     return FrontEndBaseSyncHook.html()
  31 
  32 
  33 @register.simple_tag()
  34 def frontend_base_async_assets():
  35     """
  36     This is a script tag for all ``FrontEndAssetHook`` hooks that implement a
  37     render_to_html() method - this is used in ``/base.html`` template to
  38     populate any Javascript and CSS that should be loaded at page load.
  39 
  40     :return: HTML of script tags to insert into base.html
  41     """
  42     return FrontEndBaseASyncHook.html()
  43 
  44 
  45 @register.simple_tag()
  46 def frontend_base_head_markup():
  47     """
  48     This is a script tag for all ``FrontEndBaseHeadHook`` hooks that implement
  49     a render_to_html() method - this is used in the ``/base.html`` template to
  50     inject arbitrary markup into the ``<head>`` element.
  51 
  52     :return: HTML to insert into head of base.html
  53     """
  54     return FrontEndBaseHeadHook.html()
  55 
  56 
  57 @register.simple_tag()
  58 def theme_favicon():
  59     """
  60     Render a favicon link to put in the <head> tag of base.html, if a favicon is
  61     provided by the theme. If not, a default will be returned.
  62     """
  63     favicon_urls = [
  64         logo["src"]
  65         for logo in ThemeHook.get_theme().get("logos", [])
  66         if logo.get("content_type", "") == "image/vnd.microsoft.icon"
  67     ]
  68 
  69     # Choose the first available .ico file. It's unlikely there's more than
  70     # one specified in the theme.
  71     favicon_url = favicon_urls[0] if favicon_urls else static("assets/logo.ico")
  72 
  73     return format_html('<link rel="shortcut icon" href="{}">', favicon_url)
  74
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/kolibri/core/templatetags/core_tags.py b/kolibri/core/templatetags/core_tags.py
  --- a/kolibri/core/templatetags/core_tags.py
  +++ b/kolibri/core/templatetags/core_tags.py
  @@ -14,6 +14,7 @@
   from kolibri.core.hooks import FrontEndBaseHeadHook
   from kolibri.core.hooks import FrontEndBaseSyncHook
   from kolibri.core.theme_hook import ThemeHook
  +from kolibri.utils.translation import ugettext as _
   
   register = template.Library()
   
  @@ -71,3 +72,13 @@
       favicon_url = favicon_urls[0] if favicon_urls else static("assets/logo.ico")
   
       return format_html('<link rel="shortcut icon" href="{}">', favicon_url)
  +
  +
  +@register.simple_tag()
  +def site_title():
  +    """
  +    Return the text of the site title, if provided by the theme. If not, the
  +    default will be returned. The site title may be translated, to allow for
  +    transliteration into other alphabets where needed.
  +    """
  +    return ThemeHook.get_theme().get("siteTitle", _("Kolibri"))
  
verification_info: {"golden_diff": "diff --git a/kolibri/core/templatetags/core_tags.py b/kolibri/core/templatetags/core_tags.py\n--- a/kolibri/core/templatetags/core_tags.py\n+++ b/kolibri/core/templatetags/core_tags.py\n@@ -14,6 +14,7 @@\n from kolibri.core.hooks import FrontEndBaseHeadHook\n from kolibri.core.hooks import FrontEndBaseSyncHook\n from kolibri.core.theme_hook import ThemeHook\n+from kolibri.utils.translation import ugettext as _\n \n register = template.Library()\n \n@@ -71,3 +72,13 @@\n     favicon_url = favicon_urls[0] if favicon_urls else static(\"assets/logo.ico\")\n \n     return format_html('<link rel=\"shortcut icon\" href=\"{}\">', favicon_url)\n+\n+\n+@register.simple_tag()\n+def site_title():\n+    \"\"\"\n+    Return the text of the site title, if provided by the theme. If not, the\n+    default will be returned. The site title may be translated, to allow for\n+    transliteration into other alphabets where needed.\n+    \"\"\"\n+    return ThemeHook.get_theme().get(\"siteTitle\", _(\"Kolibri\"))\n", "issue": "Allow site title to be customised\n## Overview\r\n\r\nAllow the site title to be customised; it\u2019s currently hardcoded as \u2018Kolibri\u2019.\r\n\r\n#### Description and outcomes\r\n\r\nThe site title is used in only a few places: the `<title>` of the base page and the \u2018unsupported browser\u2019 page, and the name in the PWA manifest.\r\n\r\nAlmost all of the time, the title is overridden by the plugin being used, via vuejs, so users will typically see something like \u2018Explore\u2019 or \u2018Library\u2019 instead of \u2018Kolibri\u2019.\r\n\r\nThe place where the default \u2018Kolibri\u2019 title is slightly problematic at the moment is in the PWA plugin: the name of the PWA is set to \u2018Kolibri\u2019, and that\u2019s shown much more prominently in the browser\u2019s list of PWA apps, or on the desktop app chooser when trying to run it.\r\n\r\nFor Endless Key in particular, that\u2019s a bit problematic because users will likely try to find the PWA from their desktop by searching for \u2018Endless Key\u2019 rather than \u2018Kolibri\u2019.\r\n\r\nSo it would be good to either be able to:\r\n - Separate the site title from the name of the platform (which will always be Kolibri), and allow the site title to be customised.\r\n - Or, specifically set the site title in the configuration for the PWA plugin.\r\n\r\nThe second option is much more self-contained, but doesn\u2019t seem semantically correct to me. The PWA manifest should be reflecting the main site\u2019s configuration.\r\n\r\n#### Resources\r\n\r\n - https://developer.mozilla.org/en-US/docs/Web/Manifest/name\r\n - https://developer.mozilla.org/en-US/docs/Web/Manifest/short_name\r\n\r\n#### Accessibility Requirements\r\n\r\nHaving an installed PWA use the name the users will be most familiar with it seems like an accessibility issue, although I have not been approaching it from that angle and don\u2019t know which specific accessibility spec applies here.\n", "before_files": [{"content": "\"\"\"\nKolibri template tags\n=====================\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom django import template\nfrom django.templatetags.static import static\nfrom django.utils.html import format_html\n\nfrom kolibri.core.hooks import FrontEndBaseASyncHook\nfrom kolibri.core.hooks import FrontEndBaseHeadHook\nfrom kolibri.core.hooks import FrontEndBaseSyncHook\nfrom kolibri.core.theme_hook import ThemeHook\n\nregister = template.Library()\n\n\n@register.simple_tag()\ndef frontend_base_assets():\n    \"\"\"\n    This is a script tag for all ``FrontEndAssetHook`` hooks that implement a\n    render_to_html() method - this is used in ``/base.html`` template to\n    populate any Javascript and CSS that should be loaded at page load.\n\n    :return: HTML of script tags to insert into base.html\n    \"\"\"\n    return FrontEndBaseSyncHook.html()\n\n\n@register.simple_tag()\ndef frontend_base_async_assets():\n    \"\"\"\n    This is a script tag for all ``FrontEndAssetHook`` hooks that implement a\n    render_to_html() method - this is used in ``/base.html`` template to\n    populate any Javascript and CSS that should be loaded at page load.\n\n    :return: HTML of script tags to insert into base.html\n    \"\"\"\n    return FrontEndBaseASyncHook.html()\n\n\n@register.simple_tag()\ndef frontend_base_head_markup():\n    \"\"\"\n    This is a script tag for all ``FrontEndBaseHeadHook`` hooks that implement\n    a render_to_html() method - this is used in the ``/base.html`` template to\n    inject arbitrary markup into the ``<head>`` element.\n\n    :return: HTML to insert into head of base.html\n    \"\"\"\n    return FrontEndBaseHeadHook.html()\n\n\n@register.simple_tag()\ndef theme_favicon():\n    \"\"\"\n    Render a favicon link to put in the <head> tag of base.html, if a favicon is\n    provided by the theme. If not, a default will be returned.\n    \"\"\"\n    favicon_urls = [\n        logo[\"src\"]\n        for logo in ThemeHook.get_theme().get(\"logos\", [])\n        if logo.get(\"content_type\", \"\") == \"image/vnd.microsoft.icon\"\n    ]\n\n    # Choose the first available .ico file. It's unlikely there's more than\n    # one specified in the theme.\n    favicon_url = favicon_urls[0] if favicon_urls else static(\"assets/logo.ico\")\n\n    return format_html('<link rel=\"shortcut icon\" href=\"{}\">', favicon_url)\n", "path": "kolibri/core/templatetags/core_tags.py"}], "after_files": [{"content": "\"\"\"\nKolibri template tags\n=====================\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom django import template\nfrom django.templatetags.static import static\nfrom django.utils.html import format_html\n\nfrom kolibri.core.hooks import FrontEndBaseASyncHook\nfrom kolibri.core.hooks import FrontEndBaseHeadHook\nfrom kolibri.core.hooks import FrontEndBaseSyncHook\nfrom kolibri.core.theme_hook import ThemeHook\nfrom kolibri.utils.translation import ugettext as _\n\nregister = template.Library()\n\n\n@register.simple_tag()\ndef frontend_base_assets():\n    \"\"\"\n    This is a script tag for all ``FrontEndAssetHook`` hooks that implement a\n    render_to_html() method - this is used in ``/base.html`` template to\n    populate any Javascript and CSS that should be loaded at page load.\n\n    :return: HTML of script tags to insert into base.html\n    \"\"\"\n    return FrontEndBaseSyncHook.html()\n\n\n@register.simple_tag()\ndef frontend_base_async_assets():\n    \"\"\"\n    This is a script tag for all ``FrontEndAssetHook`` hooks that implement a\n    render_to_html() method - this is used in ``/base.html`` template to\n    populate any Javascript and CSS that should be loaded at page load.\n\n    :return: HTML of script tags to insert into base.html\n    \"\"\"\n    return FrontEndBaseASyncHook.html()\n\n\n@register.simple_tag()\ndef frontend_base_head_markup():\n    \"\"\"\n    This is a script tag for all ``FrontEndBaseHeadHook`` hooks that implement\n    a render_to_html() method - this is used in the ``/base.html`` template to\n    inject arbitrary markup into the ``<head>`` element.\n\n    :return: HTML to insert into head of base.html\n    \"\"\"\n    return FrontEndBaseHeadHook.html()\n\n\n@register.simple_tag()\ndef theme_favicon():\n    \"\"\"\n    Render a favicon link to put in the <head> tag of base.html, if a favicon is\n    provided by the theme. If not, a default will be returned.\n    \"\"\"\n    favicon_urls = [\n        logo[\"src\"]\n        for logo in ThemeHook.get_theme().get(\"logos\", [])\n        if logo.get(\"content_type\", \"\") == \"image/vnd.microsoft.icon\"\n    ]\n\n    # Choose the first available .ico file. It's unlikely there's more than\n    # one specified in the theme.\n    favicon_url = favicon_urls[0] if favicon_urls else static(\"assets/logo.ico\")\n\n    return format_html('<link rel=\"shortcut icon\" href=\"{}\">', favicon_url)\n\n\n@register.simple_tag()\ndef site_title():\n    \"\"\"\n    Return the text of the site title, if provided by the theme. If not, the\n    default will be returned. The site title may be translated, to allow for\n    transliteration into other alphabets where needed.\n    \"\"\"\n    return ThemeHook.get_theme().get(\"siteTitle\", _(\"Kolibri\"))\n", "path": "kolibri/core/templatetags/core_tags.py"}]}