Repository: kedro-org/kedro

Issue:
Can't build docs in starter - need to update sphinx version
## Description
Can't build docs in starter - need to update sphinx version

## Context
Install requirements from the package `pip install -e '.[docs]'` and try to build docs with sphinx - it's old version and the conf provided requires at least version >5 (plugins).

## Steps to Reproduce
```
kedro new #... enable docs, enter the project
pip install -e '.[docs]'
mkdir docs/_build
python -m sphinx docs/source docs/_build
```

## Expected Result
The docs builds without issues.

## Actual Result
It throws an error that sphinx needs to be at version >5.

## Your Environment
Kedro 0.19.3, python 3.10, Linux



Discussion:
I see your [comment](https://github.com/kedro-org/kedro/issues/3768#issuecomment-2034286475) here, are you going to open a PR for this?
Yes
Hi @Lasica, are you still interested in creating a PR for this?



Patch:
diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/docs/source/conf.py b/kedro/templates/project/{{ cookiecutter.repo_name }}/docs/source/conf.py
index b0382b6735..d3d2b1201f 100644
--- a/kedro/templates/project/{{ cookiecutter.repo_name }}/docs/source/conf.py
+++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/docs/source/conf.py
@@ -76,7 +76,7 @@
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+language = "en"
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml b/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml
index 229c537803..f22a91242f 100644
--- a/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml
+++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml
@@ -14,17 +14,18 @@ dynamic = ["dependencies", "version"]
 
 [project.optional-dependencies]
 docs = [
-    "docutils<0.18.0",
-    "sphinx~=3.4.3",
-    "sphinx_rtd_theme==0.5.1",
+    "docutils<0.21",
+    "sphinx>=5.3,<7.3",
+     "sphinx_rtd_theme==2.0.0",
     "nbsphinx==0.8.1",
-    "sphinx-autodoc-typehints==1.11.1",
-    "sphinx_copybutton==0.3.1",
+    "sphinx-autodoc-typehints==1.20.2",
+    "sphinx_copybutton==0.5.2",
     "ipykernel>=5.3, <7.0",
-    "Jinja2<3.1.0",
-    "myst-parser~=0.17.2",
+    "Jinja2<3.2.0",
+    "myst-parser>=1.0,<2.1"
 ]
 
+
 [tool.setuptools.dynamic]
 dependencies = {file = "requirements.txt"}
 version = {attr = "{{ cookiecutter.python_package }}.__version__"}


Test patch:
diff --git a/tests/framework/cli/test_starters.py b/tests/framework/cli/test_starters.py
index 5d00fa5401..00f851978a 100644
--- a/tests/framework/cli/test_starters.py
+++ b/tests/framework/cli/test_starters.py
@@ -197,15 +197,15 @@ def _assert_requirements_ok(
         expected = {
             "optional-dependencies": {
                 "docs": [
-                    "docutils<0.18.0",
-                    "sphinx~=3.4.3",
-                    "sphinx_rtd_theme==0.5.1",
+                    "docutils<0.21",
+                    "sphinx>=5.3,<7.3",
+                    "sphinx_rtd_theme==2.0.0",
                     "nbsphinx==0.8.1",
-                    "sphinx-autodoc-typehints==1.11.1",
-                    "sphinx_copybutton==0.3.1",
+                    "sphinx-autodoc-typehints==1.20.2",
+                    "sphinx_copybutton==0.5.2",
                     "ipykernel>=5.3, <7.0",
-                    "Jinja2<3.1.0",
-                    "myst-parser~=0.17.2",
+                    "Jinja2<3.2.0",
+                    "myst-parser>=1.0,<2.1",
                 ]
             }
         }