We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve SEO for docs pages
When I Google a Flax module to pull up its API documentation, I get broken or irrelevant pages. Examples:

- [flax dense](https://www.google.com/search?q=flax%20dense) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Dense.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.Dense)
- [flax layernorm](https://www.google.com/search?q=flax%20layernorm) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.LayerNorm.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.LayerNorm)
- [flax multi head attention](https://www.google.com/search?q=flax%20attention) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.MultiHeadDotProductAttention.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.MultiHeadAttention)
- [flax conv](https://www.google.com/search?q=flax%20conv) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Conv.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.Conv)

Is there something that can be done on the website side to improve this?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # Copyright 2024 The Flax Authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """Configuration file for the Sphinx documentation builder."""
16 
17 
18 # This file only contains a selection of the most common options. For a full
19 # list see the documentation:
20 # https://www.sphinx-doc.org/en/master/usage/configuration.html
21 
22 # -- Path setup --------------------------------------------------------------
23 
24 # If extensions (or modules to document with autodoc) are in another directory,
25 # add these directories to sys.path here. If the directory is relative to the
26 # documentation root, use os.path.abspath to make it absolute, like shown here.
27 #
28 # import os
29 # import sys
30 # sys.path.insert(0, os.path.abspath('.'))
31 
32 import os
33 import sys
34 
35 sys.path.insert(0, os.path.abspath('..'))
36 # Include local extension.
37 sys.path.append(os.path.abspath('./_ext'))
38 
39 # patch sphinx
40 # -- Project information -----------------------------------------------------
41 
42 project = 'Flax'
43 copyright = '2023, The Flax authors'  # pylint: disable=redefined-builtin
44 author = 'The Flax authors'
45 
46 
47 # -- General configuration ---------------------------------------------------
48 
49 # Add any Sphinx extension module names here, as strings. They can be
50 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
51 # ones.
52 extensions = [
53   'sphinx.ext.autodoc',
54   'sphinx.ext.autosummary',
55   'sphinx.ext.autosectionlabel',
56   'sphinx.ext.doctest',
57   'sphinx.ext.intersphinx',
58   'sphinx.ext.mathjax',
59   'sphinx.ext.napoleon',
60   'sphinx.ext.viewcode',
61   'myst_nb',
62   'codediff',
63   'flax_module',
64   'sphinx_design',
65 ]
66 
67 # Add any paths that contain templates here, relative to this directory.
68 templates_path = ['_templates']
69 
70 # List of patterns, relative to source directory, that match files and
71 # directories to ignore when looking for source files.
72 # This pattern also affects html_static_path and html_extra_path.
73 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
74 
75 # The suffix(es) of source filenames.
76 # Note: important to list ipynb before md here: we have both md and ipynb
77 # copies of each notebook, and myst will choose which to convert based on
78 # the order in the source_suffix list. Notebooks which are not executed have
79 # outputs stored in ipynb but not in md, so we must convert the ipynb.
80 source_suffix = ['.rst', '.ipynb', '.md']
81 
82 autosummary_generate = True
83 
84 master_doc = 'index'
85 
86 autodoc_typehints = 'none'
87 
88 
89 # -- Options for HTML output -------------------------------------------------
90 
91 # The theme to use for HTML and HTML Help pages.  See the documentation for
92 # a list of builtin themes.
93 #
94 # html_theme = 'pydata_sphinx_theme'
95 html_theme = 'sphinx_book_theme'
96 html_css_files = ['css/flax_theme.css']
97 
98 # The name of an image file (relative to this directory) to place at the top
99 # of the sidebar.
100 html_logo = './flax.png'
101 html_favicon = './flax.png'
102 
103 # title of the website
104 html_title = ''
105 
106 # Add any paths that contain custom static files (such as style sheets) here,
107 # relative to this directory. They are copied after the builtin static files,
108 # so a file named 'default.css' will overwrite the builtin 'default.css'.
109 html_static_path = ['_static']
110 
111 html_theme_options = {
112   'repository_url': 'https://github.com/google/flax',
113   'use_repository_button': True,  # add a 'link to repository' button
114   'use_issues_button': False,  # add an 'Open an Issue' button
115   'path_to_docs': (
116     'docs'
117   ),  # used to compute the path to launch notebooks in colab
118   'launch_buttons': {
119     'colab_url': 'https://colab.research.google.com/',
120   },
121   'prev_next_buttons_location': None,
122   'show_navbar_depth': 1,
123 }
124 
125 # -- Options for myst ----------------------------------------------
126 # uncomment line below to avoid running notebooks during development
127 nb_execution_mode = 'off'
128 # Notebook cell execution timeout; defaults to 30.
129 nb_execution_timeout = 100
130 # List of patterns, relative to source directory, that match notebook
131 # files that will not be executed.
132 myst_enable_extensions = ['dollarmath']
133 nb_execution_excludepatterns = [
134   'quick_start.ipynb',  # <-- times out
135   'transfer_learning.ipynb',  # <-- transformers requires flax<=0.7.0
136   'flax/experimental/nnx',  # exclude nnx
137 ]
138 # raise exceptions on execution so CI can catch errors
139 nb_execution_allow_errors = False
140 nb_execution_raise_on_error = True
141 
142 # -- Extension configuration -------------------------------------------------
143 
144 # Tell sphinx-autodoc-typehints to generate stub parameter annotations including
145 # types, even if the parameters aren't explicitly documented.
146 always_document_param_types = True
147 
148 # -- doctest configuration -------------------------------------------------
149 doctest_global_setup = """
150 import jax
151 import jax.numpy as jnp
152 from flax.experimental import nnx
153 
154 import logging as slog
155 from absl import logging as alog
156 
157 # Avoid certain absl logging messages to break doctest
158 filtered_message = [
159   'SaveArgs.aggregate is deprecated',
160   '',
161 ]
162 
163 class _CustomLogFilter(slog.Formatter):
164   def format(self, record):
165     message = super(_CustomLogFilter, self).format(record)
166     for m in filtered_message:
167       if m in message:
168         return ''
169     return message
170 
171 alog.use_absl_handler()
172 alog.get_absl_handler().setFormatter(_CustomLogFilter())
173 """
174
```
--- 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/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -108,6 +108,8 @@
 # so a file named 'default.css' will overwrite the builtin 'default.css'.
 html_static_path = ['_static']
 
+html_extra_path = ['robots.txt']
+
 html_theme_options = {
   'repository_url': 'https://github.com/google/flax',
   'use_repository_button': True,  # add a 'link to repository' button

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -108,6 +108,8 @@\n # so a file named 'default.css' will overwrite the builtin 'default.css'.\n html_static_path = ['_static']\n \n+html_extra_path = ['robots.txt']\n+\n html_theme_options = {\n   'repository_url': 'https://github.com/google/flax',\n   'use_repository_button': True,  # add a 'link to repository' button\n", "issue": "Improve SEO for docs pages\nWhen I Google a Flax module to pull up its API documentation, I get broken or irrelevant pages. Examples:\r\n\r\n- [flax dense](https://www.google.com/search?q=flax%20dense) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Dense.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.Dense)\r\n- [flax layernorm](https://www.google.com/search?q=flax%20layernorm) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.LayerNorm.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.LayerNorm)\r\n- [flax multi head attention](https://www.google.com/search?q=flax%20attention) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.MultiHeadDotProductAttention.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.MultiHeadAttention)\r\n- [flax conv](https://www.google.com/search?q=flax%20conv) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Conv.html) | [desired page](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/layers.html#flax.linen.Conv)\r\n\r\nIs there something that can be done on the website side to improve this?\n", "before_files": [{"content": "# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\n\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\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 os\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n# Include local extension.\nsys.path.append(os.path.abspath('./_ext'))\n\n# patch sphinx\n# -- Project information -----------------------------------------------------\n\nproject = 'Flax'\ncopyright = '2023, The Flax authors'  # pylint: disable=redefined-builtin\nauthor = 'The Flax authors'\n\n\n# -- General configuration ---------------------------------------------------\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  'sphinx.ext.autodoc',\n  'sphinx.ext.autosummary',\n  'sphinx.ext.autosectionlabel',\n  'sphinx.ext.doctest',\n  'sphinx.ext.intersphinx',\n  'sphinx.ext.mathjax',\n  'sphinx.ext.napoleon',\n  'sphinx.ext.viewcode',\n  'myst_nb',\n  'codediff',\n  'flax_module',\n  'sphinx_design',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The suffix(es) of source filenames.\n# Note: important to list ipynb before md here: we have both md and ipynb\n# copies of each notebook, and myst will choose which to convert based on\n# the order in the source_suffix list. Notebooks which are not executed have\n# outputs stored in ipynb but not in md, so we must convert the ipynb.\nsource_suffix = ['.rst', '.ipynb', '.md']\n\nautosummary_generate = True\n\nmaster_doc = 'index'\n\nautodoc_typehints = 'none'\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'pydata_sphinx_theme'\nhtml_theme = 'sphinx_book_theme'\nhtml_css_files = ['css/flax_theme.css']\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = './flax.png'\nhtml_favicon = './flax.png'\n\n# title of the website\nhtml_title = ''\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']\n\nhtml_theme_options = {\n  'repository_url': 'https://github.com/google/flax',\n  'use_repository_button': True,  # add a 'link to repository' button\n  'use_issues_button': False,  # add an 'Open an Issue' button\n  'path_to_docs': (\n    'docs'\n  ),  # used to compute the path to launch notebooks in colab\n  'launch_buttons': {\n    'colab_url': 'https://colab.research.google.com/',\n  },\n  'prev_next_buttons_location': None,\n  'show_navbar_depth': 1,\n}\n\n# -- Options for myst ----------------------------------------------\n# uncomment line below to avoid running notebooks during development\nnb_execution_mode = 'off'\n# Notebook cell execution timeout; defaults to 30.\nnb_execution_timeout = 100\n# List of patterns, relative to source directory, that match notebook\n# files that will not be executed.\nmyst_enable_extensions = ['dollarmath']\nnb_execution_excludepatterns = [\n  'quick_start.ipynb',  # <-- times out\n  'transfer_learning.ipynb',  # <-- transformers requires flax<=0.7.0\n  'flax/experimental/nnx',  # exclude nnx\n]\n# raise exceptions on execution so CI can catch errors\nnb_execution_allow_errors = False\nnb_execution_raise_on_error = True\n\n# -- Extension configuration -------------------------------------------------\n\n# Tell sphinx-autodoc-typehints to generate stub parameter annotations including\n# types, even if the parameters aren't explicitly documented.\nalways_document_param_types = True\n\n# -- doctest configuration -------------------------------------------------\ndoctest_global_setup = \"\"\"\nimport jax\nimport jax.numpy as jnp\nfrom flax.experimental import nnx\n\nimport logging as slog\nfrom absl import logging as alog\n\n# Avoid certain absl logging messages to break doctest\nfiltered_message = [\n  'SaveArgs.aggregate is deprecated',\n  '',\n]\n\nclass _CustomLogFilter(slog.Formatter):\n  def format(self, record):\n    message = super(_CustomLogFilter, self).format(record)\n    for m in filtered_message:\n      if m in message:\n        return ''\n    return message\n\nalog.use_absl_handler()\nalog.get_absl_handler().setFormatter(_CustomLogFilter())\n\"\"\"\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\n\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\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 os\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n# Include local extension.\nsys.path.append(os.path.abspath('./_ext'))\n\n# patch sphinx\n# -- Project information -----------------------------------------------------\n\nproject = 'Flax'\ncopyright = '2023, The Flax authors'  # pylint: disable=redefined-builtin\nauthor = 'The Flax authors'\n\n\n# -- General configuration ---------------------------------------------------\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  'sphinx.ext.autodoc',\n  'sphinx.ext.autosummary',\n  'sphinx.ext.autosectionlabel',\n  'sphinx.ext.doctest',\n  'sphinx.ext.intersphinx',\n  'sphinx.ext.mathjax',\n  'sphinx.ext.napoleon',\n  'sphinx.ext.viewcode',\n  'myst_nb',\n  'codediff',\n  'flax_module',\n  'sphinx_design',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The suffix(es) of source filenames.\n# Note: important to list ipynb before md here: we have both md and ipynb\n# copies of each notebook, and myst will choose which to convert based on\n# the order in the source_suffix list. Notebooks which are not executed have\n# outputs stored in ipynb but not in md, so we must convert the ipynb.\nsource_suffix = ['.rst', '.ipynb', '.md']\n\nautosummary_generate = True\n\nmaster_doc = 'index'\n\nautodoc_typehints = 'none'\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'pydata_sphinx_theme'\nhtml_theme = 'sphinx_book_theme'\nhtml_css_files = ['css/flax_theme.css']\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = './flax.png'\nhtml_favicon = './flax.png'\n\n# title of the website\nhtml_title = ''\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']\n\nhtml_extra_path = ['robots.txt']\n\nhtml_theme_options = {\n  'repository_url': 'https://github.com/google/flax',\n  'use_repository_button': True,  # add a 'link to repository' button\n  'use_issues_button': False,  # add an 'Open an Issue' button\n  'path_to_docs': (\n    'docs'\n  ),  # used to compute the path to launch notebooks in colab\n  'launch_buttons': {\n    'colab_url': 'https://colab.research.google.com/',\n  },\n  'prev_next_buttons_location': None,\n  'show_navbar_depth': 1,\n}\n\n# -- Options for myst ----------------------------------------------\n# uncomment line below to avoid running notebooks during development\nnb_execution_mode = 'off'\n# Notebook cell execution timeout; defaults to 30.\nnb_execution_timeout = 100\n# List of patterns, relative to source directory, that match notebook\n# files that will not be executed.\nmyst_enable_extensions = ['dollarmath']\nnb_execution_excludepatterns = [\n  'quick_start.ipynb',  # <-- times out\n  'transfer_learning.ipynb',  # <-- transformers requires flax<=0.7.0\n  'flax/experimental/nnx',  # exclude nnx\n]\n# raise exceptions on execution so CI can catch errors\nnb_execution_allow_errors = False\nnb_execution_raise_on_error = True\n\n# -- Extension configuration -------------------------------------------------\n\n# Tell sphinx-autodoc-typehints to generate stub parameter annotations including\n# types, even if the parameters aren't explicitly documented.\nalways_document_param_types = True\n\n# -- doctest configuration -------------------------------------------------\ndoctest_global_setup = \"\"\"\nimport jax\nimport jax.numpy as jnp\nfrom flax.experimental import nnx\n\nimport logging as slog\nfrom absl import logging as alog\n\n# Avoid certain absl logging messages to break doctest\nfiltered_message = [\n  'SaveArgs.aggregate is deprecated',\n  '',\n]\n\nclass _CustomLogFilter(slog.Formatter):\n  def format(self, record):\n    message = super(_CustomLogFilter, self).format(record)\n    for m in filtered_message:\n      if m in message:\n        return ''\n    return message\n\nalog.use_absl_handler()\nalog.get_absl_handler().setFormatter(_CustomLogFilter())\n\"\"\"\n", "path": "docs/conf.py"}]}