We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
link to "view changelog" no longer works
"view changelog" on each page will lead to the old master branch which now should be `main`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `source/conf.py`
Content:
```
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Uberspace 7 lab documentation build configuration file, created by
5 # sphinx-quickstart on Tue Feb 13 12:19:29 2018.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15 
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 # import os
21 # import sys
22 # sys.path.insert(0, os.path.abspath('.'))
23 
24 import sphinx_rtd_theme
25 
26 # -- General configuration ------------------------------------------------
27 
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #
30 # needs_sphinx = '1.0'
31 
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = [
36     "authorship",
37     "sphinx.ext.extlinks",
38     "notfound.extension",
39     "sphinxcontrib.spelling",
40 ]
41 
42 # Add spelling settings
43 tokenizer_lang = "en_GB"
44 spelling_word_list_filename = "dict.txt"
45 
46 # Add any paths that contain templates here, relative to this directory.
47 templates_path = ["_templates"]
48 
49 # The suffix(es) of source filenames.
50 # You can specify multiple suffix as a list of string:
51 #
52 # source_suffix = ['.rst', '.md']
53 source_suffix = ".rst"
54 
55 # The master toctree document.
56 master_doc = "index"
57 
58 # General information about the project.
59 project = "UberLab"
60 copyright = "2018, uberspace.de"
61 author = "uberspace.de"
62 
63 # The version info for the project you're documenting, acts as replacement for
64 # |version| and |release|, also used in various other places throughout the
65 # built documents.
66 #
67 # The short X.Y version.
68 release = version = "7"
69 
70 # The language for content autogenerated by Sphinx. Refer to documentation
71 # for a list of supported languages.
72 #
73 # This is also used if you do content translation via gettext catalogs.
74 # Usually you set "language" from the command line for these cases.
75 language = None
76 
77 # List of patterns, relative to source directory, that match files and
78 # directories to ignore when looking for source files.
79 # This patterns also effect to html_static_path and html_extra_path
80 exclude_patterns = []
81 
82 # The name of the Pygments (syntax highlighting) style to use.
83 pygments_style = "sphinx"
84 
85 # If true, `todo` and `todoList` produce output, else they produce nothing.
86 todo_include_todos = False
87 
88 # Configure the `extlinks` extension to handle the `manual` and `lab`
89 # directives.
90 # By setting an empty string as the second tuple element, the display text
91 # is the same as the target by default.
92 extlinks = {
93     "manual": ("https://manual.uberspace.de/%s.html", ""),
94     "manual_anchor": ("https://manual.uberspace.de/%s", ""),
95     "lab": ("%s.html", ""),
96     "lab_anchor": ("%s", ""),
97 }
98 
99 
100 # -- Options for HTML output ----------------------------------------------
101 
102 html_theme = "sphinx_rtd_theme"
103 html_theme_options = {
104     "display_version": False,
105     "navigation_depth": 2,
106     "collapse_navigation": True,
107 }
108 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
109 html_last_updated_fmt = "%b %d, %Y"
110 html_context = {
111     "css_files": ["_static/css/custom.css"],
112     "display_github": True,
113     "github_user": "Uberspace",
114     "github_repo": "lab",
115     "github_version": "master",
116     "conf_py_path": "/source/",
117 }
118 html_show_copyright = False
119 html_favicon = "_static/favicon.ico"
120 
121 
122 # Theme options are theme-specific and customize the look and feel of a theme
123 # further.  For a list of options available for each theme, see the
124 # documentation.
125 #
126 # html_theme_options = {}
127 
128 # Add any paths that contain custom static files (such as style sheets) here,
129 # relative to this directory. They are copied after the builtin static files,
130 # so a file named "default.css" will overwrite the builtin "default.css".
131 html_static_path = ["_static"]
132 html_extra_path = ["_redirects"]
133 
134 # Custom sidebar templates, must be a dictionary that maps document names
135 # to template names.
136 #
137 # This is required for the alabaster theme
138 # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
139 html_sidebars = {
140     "**": [
141         "relations.html",  # needs 'show_related': True theme option to display
142         "searchbox.html",
143     ]
144 }
145 
146 # sphinx-notfound-page
147 # https://github.com/rtfd/sphinx-notfound-page
148 notfound_no_urls_prefix = True
149 
150 # -- Options for HTMLHelp output ------------------------------------------
151 
152 # Output file base name for HTML help builder.
153 htmlhelp_basename = "Uberspace7labdoc"
154 
155 
156 exclude_patterns = ["404.rst", "includes/proxy-rewrite-static.rst"]
157 
158 
159 def setup(app):
160     app.add_js_file("js/custom.js")
161
```
--- 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()

```

diff --git a/source/conf.py b/source/conf.py
--- a/source/conf.py
+++ b/source/conf.py
@@ -112,7 +112,7 @@
     "display_github": True,
     "github_user": "Uberspace",
     "github_repo": "lab",
-    "github_version": "master",
+    "github_version": "main",
     "conf_py_path": "/source/",
 }
 html_show_copyright = False

{"golden_diff": "diff --git a/source/conf.py b/source/conf.py\n--- a/source/conf.py\n+++ b/source/conf.py\n@@ -112,7 +112,7 @@\n     \"display_github\": True,\n     \"github_user\": \"Uberspace\",\n     \"github_repo\": \"lab\",\n-    \"github_version\": \"master\",\n+    \"github_version\": \"main\",\n     \"conf_py_path\": \"/source/\",\n }\n html_show_copyright = False\n", "issue": "link to \"view changelog\" no longer works\n\"view changelog\" on each page will lead to the old master branch which now should be `main`\n", "before_files": [{"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Uberspace 7 lab documentation build configuration file, created by\n# sphinx-quickstart on Tue Feb 13 12:19:29 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\nimport sphinx_rtd_theme\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"authorship\",\n    \"sphinx.ext.extlinks\",\n    \"notfound.extension\",\n    \"sphinxcontrib.spelling\",\n]\n\n# Add spelling settings\ntokenizer_lang = \"en_GB\"\nspelling_word_list_filename = \"dict.txt\"\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = \".rst\"\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"UberLab\"\ncopyright = \"2018, uberspace.de\"\nauthor = \"uberspace.de\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nrelease = version = \"7\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = []\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n# Configure the `extlinks` extension to handle the `manual` and `lab`\n# directives.\n# By setting an empty string as the second tuple element, the display text\n# is the same as the target by default.\nextlinks = {\n    \"manual\": (\"https://manual.uberspace.de/%s.html\", \"\"),\n    \"manual_anchor\": (\"https://manual.uberspace.de/%s\", \"\"),\n    \"lab\": (\"%s.html\", \"\"),\n    \"lab_anchor\": (\"%s\", \"\"),\n}\n\n\n# -- Options for HTML output ----------------------------------------------\n\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_options = {\n    \"display_version\": False,\n    \"navigation_depth\": 2,\n    \"collapse_navigation\": True,\n}\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\nhtml_last_updated_fmt = \"%b %d, %Y\"\nhtml_context = {\n    \"css_files\": [\"_static/css/custom.css\"],\n    \"display_github\": True,\n    \"github_user\": \"Uberspace\",\n    \"github_repo\": \"lab\",\n    \"github_version\": \"master\",\n    \"conf_py_path\": \"/source/\",\n}\nhtml_show_copyright = False\nhtml_favicon = \"_static/favicon.ico\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\nhtml_extra_path = [\"_redirects\"]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# This is required for the alabaster theme\n# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars\nhtml_sidebars = {\n    \"**\": [\n        \"relations.html\",  # needs 'show_related': True theme option to display\n        \"searchbox.html\",\n    ]\n}\n\n# sphinx-notfound-page\n# https://github.com/rtfd/sphinx-notfound-page\nnotfound_no_urls_prefix = True\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Uberspace7labdoc\"\n\n\nexclude_patterns = [\"404.rst\", \"includes/proxy-rewrite-static.rst\"]\n\n\ndef setup(app):\n    app.add_js_file(\"js/custom.js\")\n", "path": "source/conf.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Uberspace 7 lab documentation build configuration file, created by\n# sphinx-quickstart on Tue Feb 13 12:19:29 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\nimport sphinx_rtd_theme\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"authorship\",\n    \"sphinx.ext.extlinks\",\n    \"notfound.extension\",\n    \"sphinxcontrib.spelling\",\n]\n\n# Add spelling settings\ntokenizer_lang = \"en_GB\"\nspelling_word_list_filename = \"dict.txt\"\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = \".rst\"\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"UberLab\"\ncopyright = \"2018, uberspace.de\"\nauthor = \"uberspace.de\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nrelease = version = \"7\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = []\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n# Configure the `extlinks` extension to handle the `manual` and `lab`\n# directives.\n# By setting an empty string as the second tuple element, the display text\n# is the same as the target by default.\nextlinks = {\n    \"manual\": (\"https://manual.uberspace.de/%s.html\", \"\"),\n    \"manual_anchor\": (\"https://manual.uberspace.de/%s\", \"\"),\n    \"lab\": (\"%s.html\", \"\"),\n    \"lab_anchor\": (\"%s\", \"\"),\n}\n\n\n# -- Options for HTML output ----------------------------------------------\n\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_options = {\n    \"display_version\": False,\n    \"navigation_depth\": 2,\n    \"collapse_navigation\": True,\n}\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\nhtml_last_updated_fmt = \"%b %d, %Y\"\nhtml_context = {\n    \"css_files\": [\"_static/css/custom.css\"],\n    \"display_github\": True,\n    \"github_user\": \"Uberspace\",\n    \"github_repo\": \"lab\",\n    \"github_version\": \"main\",\n    \"conf_py_path\": \"/source/\",\n}\nhtml_show_copyright = False\nhtml_favicon = \"_static/favicon.ico\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\nhtml_extra_path = [\"_redirects\"]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# This is required for the alabaster theme\n# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars\nhtml_sidebars = {\n    \"**\": [\n        \"relations.html\",  # needs 'show_related': True theme option to display\n        \"searchbox.html\",\n    ]\n}\n\n# sphinx-notfound-page\n# https://github.com/rtfd/sphinx-notfound-page\nnotfound_no_urls_prefix = True\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Uberspace7labdoc\"\n\n\nexclude_patterns = [\"404.rst\", \"includes/proxy-rewrite-static.rst\"]\n\n\ndef setup(app):\n    app.add_js_file(\"js/custom.js\")\n", "path": "source/conf.py"}]}