mirror of
https://github.com/nextcloud/documentation.git
synced 2025-12-14 00:19:22 +07:00
Merge pull request #13585 from nextcloud/jtr/feat-notfound-page
feat(docs): friendly 404 page
This commit is contained in:
30
conf.py
30
conf.py
@@ -10,7 +10,13 @@ now = datetime.datetime.now()
|
|||||||
|
|
||||||
os.environ["READTHEDOCS"] = "True"
|
os.environ["READTHEDOCS"] = "True"
|
||||||
|
|
||||||
extensions = ['sphinx_rtd_theme', 'sphinx_rtd_dark_mode', 'sphinx_copybutton', 'sphinxcontrib.mermaid']
|
extensions = [
|
||||||
|
'sphinx_rtd_theme',
|
||||||
|
'sphinx_rtd_dark_mode',
|
||||||
|
'sphinx_copybutton',
|
||||||
|
'sphinxcontrib.mermaid',
|
||||||
|
'notfound.extension',
|
||||||
|
]
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
copyright = '2016-' + str(now.year) + ' Nextcloud GmbH and Nextcloud contibutors'
|
copyright = '2016-' + str(now.year) + ' Nextcloud GmbH and Nextcloud contibutors'
|
||||||
@@ -85,3 +91,25 @@ edit_on_github_branch = 'master'
|
|||||||
default_dark_mode = False
|
default_dark_mode = False
|
||||||
|
|
||||||
latex_engine = "xelatex"
|
latex_engine = "xelatex"
|
||||||
|
|
||||||
|
# -- Options for sphinx-notfound-page extension -----------------------------------
|
||||||
|
# https://github.com/readthedocs/sphinx-notfound-page
|
||||||
|
|
||||||
|
# content context passed to the 404 template
|
||||||
|
notfound_context = {
|
||||||
|
"title": "404 Page Not Found",
|
||||||
|
"body": """
|
||||||
|
<h1>Page Not Found</h1>
|
||||||
|
<h2>Sorry, we can't seem to find the page you're looking for.</h2>
|
||||||
|
<h6>Error code: 404</h6>
|
||||||
|
|
||||||
|
<h3>Here are some alternatives:</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Try using the search box.</li>
|
||||||
|
<li>Check the content menu on the side of this page.</li>
|
||||||
|
<li>Regroup at our <a href="/">documentation homepage.</a></p></li>
|
||||||
|
</ol>
|
||||||
|
""",
|
||||||
|
}
|
||||||
|
|
||||||
|
notfound_urls_prefix = None
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ sphinxcontrib-htmlhelp==2.1.0
|
|||||||
sphinxcontrib-jquery==4.1
|
sphinxcontrib-jquery==4.1
|
||||||
sphinxcontrib-jsmath==1.0.1
|
sphinxcontrib-jsmath==1.0.1
|
||||||
sphinxcontrib-mermaid==1.0.0
|
sphinxcontrib-mermaid==1.0.0
|
||||||
|
sphinx-notfound-page
|
||||||
sphinxcontrib-phpdomain==0.13.1
|
sphinxcontrib-phpdomain==0.13.1
|
||||||
sphinxcontrib-qthelp==2.0.0
|
sphinxcontrib-qthelp==2.0.0
|
||||||
sphinxcontrib-serializinghtml==2.0.0
|
sphinxcontrib-serializinghtml==2.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user